| 1 |
// PR c++/58126 |
| 2 |
|
| 3 |
struct A { // { dg-error "uninitialized" "" { target c++11 } } |
| 4 |
const int value1; // { dg-message "should be initialized" } |
| 5 |
int& value2; // { dg-message "should be initialized" } |
| 6 |
}; |
| 7 |
|
| 8 |
struct B : A { }; // { dg-error "deleted" "" { target c++11 } } |
| 9 |
|
| 10 |
A a; // { dg-error "deleted|uninitialized const member in 'struct A'|uninitialized reference member in 'struct A'" } |
| 11 |
|
| 12 |
B b; // { dg-error "deleted|uninitialized const member in base 'struct A' of 'struct B'|uninitialized reference member in base 'struct A' of 'struct B'" } |