summaryrefslogtreecommitdiff
path: root/test/Sema/pragma-pack-and-options-align.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/pragma-pack-and-options-align.c')
-rw-r--r--test/Sema/pragma-pack-and-options-align.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Sema/pragma-pack-and-options-align.c b/test/Sema/pragma-pack-and-options-align.c
index ebf1adee02f3..5bc7c83594cd 100644
--- a/test/Sema/pragma-pack-and-options-align.c
+++ b/test/Sema/pragma-pack-and-options-align.c
@@ -38,5 +38,16 @@ struct s3 {
};
extern int a[sizeof(struct s3) == 8 ? 1 : -1];
+#pragma pack(push,2)
+#pragma options align=power
+struct s4 {
+ char c;
+ int x;
+};
+#pragma pack(pop)
+#pragma options align=reset
+extern int a[sizeof(struct s4) == 8 ? 1 : -1];
+
/* expected-warning {{#pragma options align=reset failed: stack empty}} */ #pragma options align=reset
/* expected-warning {{#pragma pack(pop, ...) failed: stack empty}} */ #pragma pack(pop)
+