gcc/testsuite/g++.old-deja/g++.pt/error1.C
raw| 1 | // { dg-do assemble } |
| 2 | // Origin: Mark Mitchell <[email protected]> |
| 3 | |
| 4 | template <class T> |
| 5 | struct S |
| 6 | { |
| 7 | template <class U> |
| 8 | void f (); |
| 9 | |
| 10 | }; |
| 11 | |
| 12 | template <class T> |
| 13 | template <class U> |
| 14 | void S<T>::f () |
| 15 | { |
| 16 | U& u; // { dg-error "" } uninitialized reference |
| 17 | } |
| 18 | |
| 19 | template void S<int>::f<double>(); |