1 // PR c++/58583 2 // { dg-do compile { target c++11 } } 3 4 template<int> struct A 5 { 6 int i = (A<0>(), 0); // { dg-error "recursive instantiation of default" } 7 }; 8 9 A<0> a; 10 11 template<int N> struct B 12 { 13 B* p = new B<N>; // { dg-error "recursive instantiation of default" } 14 }; 15 16 B<1> x; 17 18 struct C 19 { 20 template<int N> struct D 21 { 22 D* p = new D<0>; // { dg-error "" } 23 }; 24 }; 25 26 C::D<0> d; 27