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 | 1c6f15d755178e0eccd3a9959565606c3f8045d2 (patch) | |
| tree | def1e79d984fe719d3a579b97bcb5acf97ae8c97 /clang/test/Sema/offsetof-64.c | |
| parent | e475dcddc9fd73eda9115150bedec851c6af985e (diff) | |
| download | bcm5719-llvm-1c6f15d755178e0eccd3a9959565606c3f8045d2.tar.gz bcm5719-llvm-1c6f15d755178e0eccd3a9959565606c3f8045d2.zip | |
Move a test that requires 64-bit mode to a separate test with a triple in
the run line.
llvm-svn: 181854
Diffstat (limited to 'clang/test/Sema/offsetof-64.c')
| -rw-r--r-- | clang/test/Sema/offsetof-64.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/Sema/offsetof-64.c b/clang/test/Sema/offsetof-64.c new file mode 100644 index 00000000000..1cabec9842f --- /dev/null +++ b/clang/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); + |

