summaryrefslogtreecommitdiff
path: root/test/Sema/pragma-align-mac68k.c
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-10-08 23:52:38 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-10-08 23:52:38 +0000
commit3ef38eea7ce400718e4ab523b4704ae1fd8f940f (patch)
treecb380f13d938c4c72ff1711d22f463659fc16f61 /test/Sema/pragma-align-mac68k.c
parent7716a6be1c2709ecf86747fc2fcf6b2e2a956db3 (diff)
downloadclang-3ef38eea7ce400718e4ab523b4704ae1fd8f940f.tar.gz
Make sure we allow "#pragma options align=mac68k" in function-local contexts. <rdar://problem/12453134>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165462 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/pragma-align-mac68k.c')
-rw-r--r--test/Sema/pragma-align-mac68k.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Sema/pragma-align-mac68k.c b/test/Sema/pragma-align-mac68k.c
index fb8da515bb..64c693907f 100644
--- a/test/Sema/pragma-align-mac68k.c
+++ b/test/Sema/pragma-align-mac68k.c
@@ -96,3 +96,15 @@ extern int a11_0[offsetof(struct s11, f0) == 0 ? 1 : -1];
extern int a11_1[offsetof(struct s11, f1) == 2 ? 1 : -1];
extern int a11_2[sizeof(struct s11) == 10 ? 1 : -1];
extern int a11_3[__alignof(struct s11) == 2 ? 1 : -1];
+
+#pragma options align=reset
+
+void f12(void) {
+ #pragma options align=mac68k
+ struct s12 {
+ char f0;
+ int f1;
+ };
+ #pragma options align=reset
+ extern int a12[sizeof(struct s12) == 6 ? 1 : -1];
+}