clang/test/AST/absurdly_big_struct.cpp
raw| 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s -triple x86_64-linux-gnu |
| 2 | |
| 3 | struct a { // expected-error {{structure 'a' is too large, which exceeds maximum allowed size of 1152921504606846976 bytes}} |
| 4 | char x[1ull<<60]; |
| 5 | char x2[1ull<<60]; |
| 6 | }; |
| 7 | |
| 8 | a z[1]; |
| 9 | long long x() { return sizeof(a); } |
| 10 | long long x2() { return sizeof(a::x); } |
| 11 | long long x3() { return sizeof(a::x2); } |
| 12 | long long x4() { return sizeof(z); } |
| 13 |