aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900406_01.C
blob: f99f73d723e0e24ead537ca0586442606a63c1dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// { dg-do assemble  }
// g++ 1.37.1 bug 900406_01

// The following code causes g++ to segfault.

// cfront 2.0 passes this test.

// keywords: segfault, operator new, array types, array bounds

void function0 ()
{
  new int[];		// { dg-error "" } causes segfault
}

void function1 ()
{
  new int (*)[];	// { dg-error "" } no size specified 
}

int main () { return 0; }