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[]; sort(long len)8void sort (long len) 9 { 10 new char[100]; 11 } 12 char machineMain[] = "main"; main(void)13int main(void) 14 { 15 if (sizeof(machineMain)!=sizeof("main")) 16 __builtin_abort(); 17 } 18 19 20