c++: Add [dcl.init.aggr] examples to testsuite
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / array3.C
blob6eeeb4f3888dc6743d1b9c0d66d2898593e5da52
1 // { dg-do assemble  }
2 // 
3 // Copyright (C) 2000 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 10 Aug 2000 <nathan@codesourcery.com>
6 // bug 386.C We ICE'd before emitting a diagnostic when trying to
7 // initialize a constant non-pod array from something bogus.
10 struct A
12   A(char);
15 class B
17   const A ary[16];
19   B (const A ary[]);
22 B::B (const A a[])
23                   // { dg-error "could not convert|invalid conversion" "" { target { c++20 } } .+1 }
24   : ary(a)        // { dg-error "array" "" { target { ! c++20 } } }