Merged revisions 208012,208018-208019,208021,208023-208030,208033,208037,208040-20804...
[official-gcc.git] / main / gcc / testsuite / g++.dg / init / new35.C
blob7d07cf57f86594daf3812d832e186f3cfe2032f0
1 // { dg-do compile }
2 // { dg-options "" }
4 int
5 main (int argc, char **argv)
7   typedef char A[argc];
8   new A; // { dg-warning "array" }
9   new A[0]; // { dg-error "must be constant|not a constant" }
10   new A[5]; // { dg-error "must be constant|not a constant" }
11   new (A[0]); // { dg-error "must be constant|not a constant" }
12   new (A[5]); // { dg-error "must be constant|not a constant" }