Move a test that requires 64-bit mode to a separate test with a triple in

the run line.

llvm-svn: 181854
This commit is contained in:
Richard Trieu 2013-05-15 00:44:06 +00:00
parent e475dcddc9
commit 1c6f15d755
2 changed files with 15 additions and 11 deletions

View File

@ -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);

View 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);