]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/fail_compilation/staticarrayoverflow.d
Add D front-end, libphobos library, and D2 testsuite.
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / staticarrayoverflow.d
1 /*
2 REQUIRED_ARGS: -m64
3 PERMUTE_ARGS:
4 ---
5 fail_compilation/staticarrayoverflow.d(21): Error: static array S[1879048192] size overflowed to 7516192768000
6 fail_compilation/staticarrayoverflow.d(21): Error: variable staticarrayoverflow.y size overflow
7 fail_compilation/staticarrayoverflow.d(22): Error: variable staticarrayoverflow.z size of x1000ae0 exceeds max allowed size 0x100_0000
8 fail_compilation/staticarrayoverflow.d(23): Error: static array S[8070450532247928832] size overflowed to 0
9 fail_compilation/staticarrayoverflow.d(23): Error: variable staticarrayoverflow.a size overflow
10 ---
11 */
12
13
14
15 struct S
16 {
17 int[1000] x;
18 }
19
20 S[0x7000_0000] y;
21 S[0x100_0000/(4*1000 - 1)] z;
22 S[0x7000_0000_0000_0000] a;
23