]> granicus.if.org Git - clang/commitdiff
Rename an alignment test to be more precise and add another test for the default
authorChad Rosier <mcrosier@apple.com>
Mon, 25 Jul 2011 19:00:00 +0000 (19:00 +0000)
committerChad Rosier <mcrosier@apple.com>
Mon, 25 Jul 2011 19:00:00 +0000 (19:00 +0000)
ABI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135934 91177308-0d34-0410-b5e6-96231b3b80d8

test/Sema/align-arm-apcs-gnu.c [new file with mode: 0644]
test/Sema/align-arm-apcs.c [deleted file]
test/Sema/align-arm.c [new file with mode: 0644]

diff --git a/test/Sema/align-arm-apcs-gnu.c b/test/Sema/align-arm-apcs-gnu.c
new file mode 100644 (file)
index 0000000..6628b0c
--- /dev/null
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -triple arm-unknown-unknown -target-abi apcs-gnu -fsyntax-only -verify %s
+
+struct s0 { double f0; int f1; };
+char chk0[__alignof__(struct s0) == 4 ? 1 : -1]; 
+
+double g1;
+short chk1[__alignof__(g1) == 4 ? 1 : -1]; 
+short chk2[__alignof__(double) == 4 ? 1 : -1];
+
+long long g2;
+short chk1[__alignof__(g2) == 4 ? 1 : -1]; 
+short chk2[__alignof__(long long) == 4 ? 1 : -1];
+
+_Complex double g3;
+short chk1[__alignof__(g3) == 4 ? 1 : -1]; 
+short chk2[__alignof__(_Complex double) == 4 ? 1 : -1];
diff --git a/test/Sema/align-arm-apcs.c b/test/Sema/align-arm-apcs.c
deleted file mode 100644 (file)
index 0a5d3fe..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-// RUN: %clang_cc1 -triple arm-unknown-unknown -target-abi apcs-gnu -fsyntax-only -verify %s
-
-struct s0 { double f0; int f1; };
-char chk0[__alignof__(struct s0) == 4 ? 1 : -1]; 
diff --git a/test/Sema/align-arm.c b/test/Sema/align-arm.c
new file mode 100644 (file)
index 0000000..68eb44d
--- /dev/null
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -triple armv7-apple-darwin10 -fsyntax-only -verify %s
+
+double g1;
+short chk1[__alignof__(g1) == 8 ? 1 : -1]; 
+short chk2[__alignof__(double) == 8 ? 1 : -1];
+
+long long g2;
+short chk1[__alignof__(g2) == 8 ? 1 : -1]; 
+short chk2[__alignof__(long long) == 8 ? 1 : -1];
+
+_Complex double g3;
+short chk1[__alignof__(g3) == 8 ? 1 : -1]; 
+short chk2[__alignof__(_Complex double) == 8 ? 1 : -1];