OSDN Git Service

* parser.c (cp_parser_class_specifier): Set class location to that
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.jason / template22.C
1 // { dg-do assemble  }
2 // Testcase for proper unification of code involving references.
3
4 template<class T>
5 struct A
6 {
7     void foo();
8 };
9
10 template<class T> void A<T>::foo() { }
11
12 template class A<int&>;
13
14 const int& f1 ();
15 int& f2 ();
16 int f3 ();
17
18 template <class T> void g1 (const T&);
19 template <class T> void g2 (T&);
20 template <class T> void g3 (T);
21
22 int main()
23 {
24   g1 (f1 ());
25   g1 (f2 ());
26   g1 (f3 ());
27   g2 (f2 ());
28   g3 (f1 ());
29   g3 (f2 ());
30   g3 (f3 ());
31 }