OSDN Git Service

Add NIOS2 support. Code from SourceyG++.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.pt / memtemp78.C
1 // { dg-do assemble  }
2
3 struct A 
4 {
5   void f() {}
6
7   template <class U>
8   void f() {}
9 };
10
11
12 template <class T>
13 struct B
14 {
15   void f() {}
16
17   template <class U>
18   void f() {}
19 };
20
21 template struct B<int>;
22
23 struct C 
24 {
25   template <class U>
26   void f() {}  // { dg-error "with" } redeclaration
27
28   template <class U>
29   void f() {}  // { dg-error "overloaded" } redeclaration
30 };
31
32
33 template <class T, class U>
34 struct D
35 {
36   void f(T);
37   void f(U);
38 };
39
40 template struct D<int, double>;
41
42 template <class T, class U>
43 struct D2
44 {
45   void f(T); // { dg-error "with" } redeclaration 
46   void f(U); // { dg-error "overloaded" } redeclaration 
47 };
48
49 template struct D2<int, int>; 
50
51 struct E
52 {
53   void f();  // { dg-error "with" } redeclaration
54   void f(); // { dg-error "overloaded" } redeclaration
55 };
56