c++: Don't crash upon invalid placement new operator [PR117101]
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20040411-1.c
blobfbc7f7b4de1c6e81a281771b23db4a41958d1b08
1 void abort (void);
3 int
4 sub1 (int i, int j)
6 typedef int c[i+2];
7 int x[10], y[10];
9 if (j == 2)
11 __builtin_memcpy (x, y, 10 * sizeof (int));
12 return sizeof (c);
14 else
15 return sizeof (c) * 3;
18 int
19 main ()
21 if (sub1 (20, 3) != 66 * sizeof (int))
22 abort ();
24 return 0;