diff options
author | Richard Trieu <rtrieu@google.com> | 2013-05-15 00:44:06 +0000 |
---|---|---|
committer | Richard Trieu <rtrieu@google.com> | 2013-05-15 00:44:06 +0000 |
commit | 1bb8cb5558f46502b84e3b2935b7f5b4c1759d21 (patch) | |
tree | 58b1af96278f30cb3f025509cb2eb7f7603e881e | |
parent | 2a3c9664b826963a294b0e07141baad9517d402b (diff) | |
download | clang-1bb8cb5558f46502b84e3b2935b7f5b4c1759d21.tar.gz clang-1bb8cb5558f46502b84e3b2935b7f5b4c1759d21.tar.bz2 clang-1bb8cb5558f46502b84e3b2935b7f5b4c1759d21.tar.xz |
Move a test that requires 64-bit mode to a separate test with a triple in
the run line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181854 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Sema/offsetof-64.c | 15 | ||||
-rw-r--r-- | test/Sema/offsetof.c | 11 |
2 files changed, 15 insertions, 11 deletions
diff --git a/test/Sema/offsetof-64.c b/test/Sema/offsetof-64.c new file mode 100644 index 0000000000..1cabec9842 --- /dev/null +++ b/test/Sema/offsetof-64.c @@ -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); + diff --git a/test/Sema/offsetof.c b/test/Sema/offsetof.c index 4e7fd7f29e..9e876ad589 100644 --- a/test/Sema/offsetof.c +++ b/test/Sema/offsetof.c @@ -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); |