OSDN Git Service

gcc/cp:
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / instantiate1.C
1 // { dg-do compile }
2 // Origin:
3
4 // PR c++/6716
5 // ICE in complex class structure when components are incomplete
6
7 template <class T> struct X {
8   T t;                          // { dg-error "incomplete" }
9 };
10
11 template <class T> struct Y {
12   X<T> x;                       // { dg-error "instantiated" }
13 };
14
15 template <class T> struct Z {   // { dg-error "declaration" }
16   Y<Z<T> > y;                   // { dg-error "instantiated" }
17 };
18
19 struct ZZ : Z<int>              // { dg-error "instantiated" }
20 {
21 };