aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/template/instantiate1.C
blob: dd501684e6389708defce5de0d7d57368282e002 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// { dg-do compile }
// Origin:

// PR c++/6716
// ICE in complex class structure when components are incomplete

template <class T> struct X {
  T t;				// { dg-error "incomplete" }
};

template <class T> struct Y {
  X<T> x;			// { dg-message "required" }
};

template <class T> struct Z {	// { dg-error "declaration" }
  Y<Z<T> > y;			// { dg-message "required" }
};

struct ZZ : Z<int>
{
};