OSDN Git Service

Add NIOS2 support. Code from SourceyG++.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.pt / local4.C
1 // { dg-do run  }
2 extern "C" void abort();
3
4 template <class T>
5 struct S {};
6
7 S<int> si;
8
9 template <class T>
10 int f(T t)
11 {
12   struct S { 
13     int g(int i) { return i + 2; }
14   };
15
16   S s;
17
18   return s.g(t) + s.g(t);
19 }
20
21
22 int main()
23 {
24   if (f(3) != 10)
25     abort();
26 }