diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2008-05-29 10:58:49 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2008-05-29 10:58:49 +0000 |
commit | 5a6d0ede91bddf21b494382d6d975d6fb2db80a9 (patch) | |
tree | 74cf8bf6939ae3ebe51adcaf330528bfaef2c1c3 /clang/test/CodeGen/struct.c | |
parent | bb936ce207115981248e27c591d534867d941b12 (diff) | |
download | bcm5719-llvm-5a6d0ede91bddf21b494382d6d975d6fb2db80a9.tar.gz bcm5719-llvm-5a6d0ede91bddf21b494382d6d975d6fb2db80a9.zip |
Always use packed structs. This isn't really very nice, but there's
nothing fundamentally wrong with it. Emitting unpacked structs where
possible is more work for almost no practical benefit. We'll probably
want to fix it at some point anyway, but it's low priority.
The issue with long double in particular is that LLVM thinks an X86 long
double is 10 bytes, while clang considers it for all purposes to be
either 12 or 16 bytes, depending on the platform, even in a packed
struct.
llvm-svn: 51673
Diffstat (limited to 'clang/test/CodeGen/struct.c')
-rw-r--r-- | clang/test/CodeGen/struct.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/CodeGen/struct.c b/clang/test/CodeGen/struct.c index f17a7af76c8..f567a0b2ff1 100644 --- a/clang/test/CodeGen/struct.c +++ b/clang/test/CodeGen/struct.c @@ -163,3 +163,6 @@ int f14(int i, ...) { /* Attribute packed */ struct __attribute__((packed)) S2839 { double a[19]; signed char b; } s2839[5]; + +struct __attribute__((packed)) SS { long double a; char b; } SS; + |