1 // Origin: PR c++/51633 2 // { dg-do compile { target c++11 } } 3 4 struct A 5 { AA6 constexpr A() {} 7 ~A(); 8 }; 9 10 struct B 11 { 12 A a; 13 A b; 14 A c; BB15 constexpr B() {} 16 }; 17 18 struct C 19 { 20 A a; CC21 constexpr C() {} 22 }; 23 24 struct D 25 { DD26 constexpr D() { return;} // { dg-error "does not have empty body" "" { target c++11_only } } 27 }; 28 29 struct D1 30 { 31 A a; D1D132 constexpr D1() { return;} // { dg-error "does not have empty body" "" { target c++11_only } } 33 }; 34 35 struct D2 36 { 37 A a; 38 A b; D2D239 constexpr D2() { return;} // { dg-error "does not have empty body" "" { target c++11_only } } 40 }; 41 42 struct D3 43 { 44 A a; 45 A b; 46 A c; D3D347 constexpr D3() { return;} // { dg-error "does not have empty body" "" { target c++11_only } } 48 }; 49