blob: f6e81aa362efcbf3b8c41772ef94f687969230f2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// { dg-do assemble }
// Testcase for proper unification of code involving references.
template<class T>
struct A
{
void foo();
};
template<class T> void A<T>::foo() { }
template class A<int&>;
const int& f1 ();
int& f2 ();
int f3 ();
template <class T> void g1 (const T&);
template <class T> void g2 (T&);
template <class T> void g3 (T);
int main()
{
g1 (f1 ());
g1 (f2 ());
g1 (f3 ());
g2 (f2 ());
g3 (f1 ());
g3 (f2 ());
g3 (f3 ());
}
|