aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2011-07-25 19:00:00 +0000
committerChad Rosier <mcrosier@apple.com>2011-07-25 19:00:00 +0000
commit33abf4ed29594fa6af530def2a93a2bb69ab8863 (patch)
tree7995563237701dec44472af33f8dc96e3b0422f4
parent34bc0ec14ca764db146423bfc81ed8fc59bf06a6 (diff)
Rename an alignment test to be more precise and add another test for the default
ABI. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135934 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Sema/align-arm-apcs-gnu.c16
-rw-r--r--test/Sema/align-arm-apcs.c4
-rw-r--r--test/Sema/align-arm.c13
3 files changed, 29 insertions, 4 deletions
diff --git a/test/Sema/align-arm-apcs-gnu.c b/test/Sema/align-arm-apcs-gnu.c
new file mode 100644
index 0000000000..6628b0c830
--- /dev/null
+++ b/test/Sema/align-arm-apcs-gnu.c
@@ -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
index 0a5d3fe921..0000000000
--- a/test/Sema/align-arm-apcs.c
+++ /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
index 0000000000..68eb44d7b0
--- /dev/null
+++ b/test/Sema/align-arm.c
@@ -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];