2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / parse / crash11.C
blob4893678d46f27d02a9344f7cc46ab75acc573b20
1 // { dg-do compile }
3 // Origin: priesnit@math.uni-goettingen.de
5 // PR c++/5767: ICE parsing typename with invalid scope.
7 template <template <typename> class TP>
8 struct A
10   template <typename T>
11   struct Template
12   {
13     typedef typename TP<T>::Type Type;
14   };
16 template <template <typename> class TP>
17 struct B
19   template <typename T>
20   struct Template
21   {
22     typedef typename A<A<TP>::Template>
23       ::template Template<T>::Type Type; // { dg-error "mismatch|class template|unqualified-id" }
24   };
26 template <typename T>
27 struct C
29   typedef void Type;
31 int main()
33   typedef B<C>::Template<void>::Type Type; // { dg-error "init-declarator|;" }