blob: 08d5185c09c3e17bc432f949d386fdc7bd5b7f28 [file] [log] [blame]
// PR C++/52369
// { dg-do compile { target { ! c++11 } } }
class B
{
int const v_; // { dg-message "should be initialized" }
};
struct D : B {};
class A
{
int& ref; // { dg-message "should be initialized" }
};
struct C : A {};
void f()
{
D d; // { dg-error "uninitialized" }
new D; // { dg-error "uninitialized" }
D();
new D();
C c; // { dg-error "uninitialized" }
new C; // { dg-error "uninitialized" }
C(); // { dg-error "value-initialization" }
new C(); // { dg-error "value-initialization" }
}