diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/opt/template1.C')
-rw-r--r-- | gcc/testsuite/g++.dg/opt/template1.C | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/opt/template1.C b/gcc/testsuite/g++.dg/opt/template1.C new file mode 100644 index 000000000..f25434693 --- /dev/null +++ b/gcc/testsuite/g++.dg/opt/template1.C @@ -0,0 +1,19 @@ +// { dg-options "-O2" } +// { dg-final { scan-assembler-not "\n_?_ZN1AILi0EE4foo1Ev\[: \t\n\]" } } + +template <int> +struct A { + void foo1 () throw (); + void foo2 (); + + void UNRELATED (); +}; + +template <> void A<0>::UNRELATED (); + +template <int dim> inline void A<dim>::foo1 () throw () {} +template <int dim> inline void A<dim>::foo2 () {} + +void bar (A<0> &a) { + a.foo1 (); +} |