repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
d: Fix gdc -O2 -mavx generates misaligned vmovdqa instruction [PR114171]
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.jason
/
template22.C
blob
f6e81aa362efcbf3b8c41772ef94f687969230f2
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
}