summaryrefslogtreecommitdiff
path: root/test/Sema/bitfield-layout.c
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2010-07-13 17:21:42 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2010-07-13 17:21:42 +0000
commit4ba675006b5a8edfc48b6a9bd3dcf54a70cc08f2 (patch)
tree48b44512b5db8ced345df4a1a56b5065cf2a14d9 /test/Sema/bitfield-layout.c
parentd7279c4c177bca357ef96ff1379fd9bc420bfe83 (diff)
Diffstat (limited to 'test/Sema/bitfield-layout.c')
-rw-r--r--test/Sema/bitfield-layout.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Sema/bitfield-layout.c b/test/Sema/bitfield-layout.c
index edc44bdefa08e..2655fc70cd4c4 100644
--- a/test/Sema/bitfield-layout.c
+++ b/test/Sema/bitfield-layout.c
@@ -30,3 +30,13 @@ CHECK_ALIGN(struct, e, 1)
struct f {__attribute((aligned(8))) int x : 30, y : 30, z : 30;};
CHECK_SIZE(struct, f, 24)
CHECK_ALIGN(struct, f, 8)
+
+// Large structure (overflows i32, in bits).
+struct s0 {
+ char a[0x32100000];
+ int x:30, y:30;
+};
+
+CHECK_SIZE(struct, s0, 0x32100008)
+CHECK_ALIGN(struct, s0, 4)
+