]> granicus.if.org Git - clang/commitdiff
Move a test that requires 64-bit mode to a separate test with a triple in
authorRichard Trieu <rtrieu@google.com>
Wed, 15 May 2013 00:44:06 +0000 (00:44 +0000)
committerRichard Trieu <rtrieu@google.com>
Wed, 15 May 2013 00:44:06 +0000 (00:44 +0000)
the run line.

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

test/Sema/offsetof-64.c [new file with mode: 0644]
test/Sema/offsetof.c

diff --git a/test/Sema/offsetof-64.c b/test/Sema/offsetof-64.c
new file mode 100644 (file)
index 0000000..1cabec9
--- /dev/null
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s -triple x86_64-linux-gnu
+// expected-no-diagnostics
+
+// PR15216
+// Don't crash when taking computing the offset of structs with large arrays.
+const unsigned long Size = (1l << 62);
+
+struct Chunk {
+  char padding[Size];
+  char more_padding[1][Size];
+  char data;
+};
+
+int test1 = __builtin_offsetof(struct Chunk, data);
+
index 4e7fd7f29e9e93dab6f0bf201655c8f43fda88e3..9e876ad5898e1238ce8feb9bc2ad4ebaabc1e226 100644 (file)
@@ -70,14 +70,3 @@ int test5() {
   return __builtin_offsetof(Array, array[*(int*)0]); // expected-warning{{indirection of non-volatile null pointer}} expected-note{{__builtin_trap}}
 }
 
-// PR15216
-// Don't crash when taking computing the offset of structs with large arrays.
-const unsigned long Size = (1l << 62);
-
-struct Chunk {
-  char padding[Size];
-  char more_padding[1][Size];
-  char data;
-};
-
-int test6 = __builtin_offsetof(struct Chunk, data);