Merged r158704 through r158906 into branch.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / pr42844-2.C
blob5af4ff217f3787c10b4998b93803166d1b6b1eb3
1 // PR c++/42844
2 // { dg-do compile }
3 // { dg-options "-std=c++0x" }
5 struct A // { dg-message "user-provided default constructor" }
7     A() = default; // { dg-message "not user-provided" }
8 };
10 struct Base
12     Base() {}
15 struct Derived : Base // { dg-message "user-provided default constructor" }
17     Derived() = default; // { dg-message "not user-provided" }
20 struct Derived2 : Base // { dg-message "user-provided default constructor" }
22     Derived2() = default; // { dg-message "not user-provided" }
23     Derived2( Derived2 const& ) = default;
26 struct Derived3 : Base // { dg-message "user-provided default constructor" }
28     Derived3( Derived3 const& ) = default;
29     Derived3() = default; // { dg-message "not user-provided" }
32 void f()
34     const A a; // { dg-error "uninitialized const" }
35     const Derived d; // { dg-error "uninitialized const" }
36     const Derived2 d2; // { dg-error "uninitialized const" }
37     const Derived3 d3; // { dg-error "uninitialized const" }