gcc/testsuite/g++.old-deja/g++.pt/t18.C
raw| 1 | // { dg-do assemble } |
| 2 | |
| 3 | extern void byebye (); |
| 4 | template <class T1, class T2> |
| 5 | struct A |
| 6 | { |
| 7 | T1 t1; |
| 8 | T2 t2; |
| 9 | A() { t1 = 0; t2 = 0; } |
| 10 | ~A() { byebye(); } |
| 11 | }; |
| 12 | |
| 13 | template <class Q> |
| 14 | int f (A<int, Q> a) { |
| 15 | return a.t1; |
| 16 | } |
| 17 | |
| 18 | extern A<int,double*> aa; |
| 19 | int foop () { return f(aa); } |