aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/struct-packed-align.c
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-10-03 17:33:35 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-10-03 17:33:35 +0000
commit7d076643e77a941cd1e53ed4a328df64c88140a5 (patch)
tree8bd7ca94602570580c6689b5017c237823d74ff6 /test/Sema/struct-packed-align.c
parent5e592d889071d15d455deeafcc53955ccfcd0424 (diff)
Merge postfix attributes on record decls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57019 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/struct-packed-align.c')
-rw-r--r--test/Sema/struct-packed-align.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Sema/struct-packed-align.c b/test/Sema/struct-packed-align.c
index 6398cd3993..8173f0f282 100644
--- a/test/Sema/struct-packed-align.c
+++ b/test/Sema/struct-packed-align.c
@@ -89,3 +89,15 @@ union au6 {char c; __attribute__((packed, aligned(2))) int x;};
extern int k1[sizeof(union au6) == 4 ? 1 : -1];
extern int k2[__alignof(union au6) == 2 ? 1 : -1];
+// Check postfix attributes
+union au7 {char c; int x;} __attribute__((packed));
+extern int l1[sizeof(union au7) == 4 ? 1 : -1];
+extern int l2[__alignof(union au7) == 1 ? 1 : -1];
+
+struct packed_fas2 {
+ char a;
+ int b[];
+} __attribute__((packed));
+
+extern int m1[sizeof(struct packed_fas2) == 1 ? 1 : -1];
+extern int m2[__alignof(struct packed_fas2) == 1 ? 1 : -1];