| 1 |
// { dg-do assemble } |
| 2 |
// |
| 3 |
// Copyright (C) 2000 Free Software Foundation, Inc. |
| 4 |
// Contributed by Nathan Sidwell 10 Aug 2000 <[email protected]> |
| 5 |
|
| 6 |
// bug 386.C We ICE'd before emitting a diagnostic when trying to |
| 7 |
// initialize a constant non-pod array from something bogus. |
| 8 |
|
| 9 |
|
| 10 |
struct A |
| 11 |
{ |
| 12 |
A(char); |
| 13 |
}; |
| 14 |
|
| 15 |
class B |
| 16 |
{ |
| 17 |
const A ary[16]; |
| 18 |
|
| 19 |
B (const A ary[]); |
| 20 |
}; |
| 21 |
|
| 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 } } } |
| 25 |
{ |
| 26 |
} |