Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / g++.old-deja / g++.pt / spec39.C
blob8b4e76745f1cf6e553466a5f9d5061d539564beb
1 // { dg-do assemble  }
2 // 
3 // Copyright (C) 2000 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 19 Jan 2001 <nathan@codesourcery.com>
6 // Bug 1656. We failed to make sure that a template-id was built
7 // from a primary template.
9 template <int dim> struct Outer
11   struct Inner {};
13   void f()
14   {
15     Inner<dim> i;         // { dg-error "" } non-template
16     Inner<> j;            // { dg-error "" } non-template
17   }
19 struct O {};
20 void foo ()
22   Outer<1> x;
23   x.f ();
24   Outer<1>::Inner<2> z;   // { dg-error "" } non-template
25   O<1> w;                 // { dg-error "" } non-template
28 template <typename T, template <typename C> class TPL>
29 struct X
31   TPL<T> t;
32   T<int> s;     // { dg-error "" } non-template
35 template <typename T> struct Y
39 void bar ()
41   X<int, Y> a;
42   X<int, O> b;  // { dg-error "" } non-template