1 /* PR c++/84294 - attributes on a function template redeclaration silently
4 { dg-options "-O -fdump-tree-optimized" } */
6 template <void test ()>
14 void __attribute__ ((noinline)) func_noinline_none ();
15 void func_noinline_none () { x = __LINE__; }
17 template void test_func<func_noinline_none>();
18 // { dg-final { scan-tree-dump-times "func_noinline_none *\\(\\);" 1 "optimized" } }
21 void func_none_noinline ();
22 void __attribute__ ((noinline)) func_none_noinline () { x = __LINE__; }
24 template void test_func<func_none_noinline>();
25 // { dg-final { scan-tree-dump-times "func_none_noinline *\\(\\);" 1 "optimized" } }
29 void __attribute__ ((noinline)) templ_noinline_none () { x = __LINE__; }
32 void templa_noinline_none ();
34 template void test_func<templ_noinline_none<int> >();
35 // { dg-final { scan-tree-dump-times "templ_noinline_none<int> *\\(\\);" 1 "optimized" } }
39 void templ_none_noinline ();
42 void __attribute__ ((noinline)) templ_none_noinline () { x = __LINE__; }
44 template void test_func<templ_none_noinline<int> >();
45 // { dg-final { scan-tree-dump-times "templ_none_noinline<int> *\\(\\);" 1 "optimized" } }