gcc/testsuite/g++.dg/opt/template1.C
raw| 1 | // { dg-options "-O2" } |
| 2 | // { dg-final { scan-assembler-not "\n_?_ZN1AILi0EE4foo1Ev\[: \t\n\]" } } |
| 3 | |
| 4 | template <int> |
| 5 | struct A { |
| 6 | void foo1 () throw (); |
| 7 | void foo2 (); |
| 8 | |
| 9 | void UNRELATED (); |
| 10 | }; |
| 11 | |
| 12 | template <> void A<0>::UNRELATED (); |
| 13 | |
| 14 | template <int dim> inline void A<dim>::foo1 () throw () {} |
| 15 | template <int dim> inline void A<dim>::foo2 () {} |
| 16 | |
| 17 | void bar (A<0> &a) { |
| 18 | a.foo1 (); |
| 19 | } |