OSDN Git Service

/cp
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / other / array4.C
1 // PR C++/28906: new on an array causes incomplete arrays to
2 // become complete with the wrong size.
3 // The sizeof machineMain should be 5 and not 100.
4 // { dg-do run }
5
6
7 extern char machineMain[];
8 void sort (long len)
9 {
10   new char[100];
11 }
12 char machineMain[] = "main";
13 int main(void)
14 {
15   if (sizeof(machineMain)!=sizeof("main"))
16     __builtin_abort();
17 }
18
19