summaryrefslogtreecommitdiffstats
path: root/test/Sema/struct-packed-align.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/struct-packed-align.c')
-rw-r--r--test/Sema/struct-packed-align.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Sema/struct-packed-align.c b/test/Sema/struct-packed-align.c
index 2b94567..6ca6a60 100644
--- a/test/Sema/struct-packed-align.c
+++ b/test/Sema/struct-packed-align.c
@@ -117,3 +117,18 @@ struct packed_fas2 {
extern int m1[sizeof(struct packed_fas2) == 1 ? 1 : -1];
extern int m2[__alignof(struct packed_fas2) == 1 ? 1 : -1];
+
+// Attribute aligned can round down typedefs. PR9253
+typedef long long __attribute__((aligned(1))) nt;
+
+struct nS {
+ char buf_nr;
+ nt start_lba;
+};
+
+extern int n1[sizeof(struct nS) == 9 ? 1 : -1];
+extern int n2[__alignof(struct nS) == 1 ? 1 : -1];
+
+
+
+
OpenPOWER on IntegriCloud