1 /* PR c++/84294 - attributes on a function template redeclaration silently
4 { dg-options "-O -fdump-tree-optimized" } */
16 // Should be eliminated.
19 // Expect no -Wreturn type here despite the absence of a return
20 // statement in a non-void function.
21 } // { dg-bogus "\\\[-Wreturn-type]" "bug 84621" { xfail *-*-* } }
23 void __attribute__ ((noreturn)) func_noreturn_none ();
24 void func_noreturn_none ();
26 template int test_func<func_noreturn_none>();
29 void func_none_noreturn ();
30 void __attribute__ ((noreturn)) func_none_noreturn ();
32 template int test_func<func_none_noreturn>();
36 void __attribute__ ((noreturn)) templ_noreturn_none ();
39 void templa_noreturn_none ();
41 template int test_func<templ_noreturn_none<int> >();
45 void templ_none_noreturn ();
48 void __attribute__ ((noreturn)) templ_none_noreturn ();
50 template int test_func<templ_none_noreturn<int> >();
53 // Verify that calls to fail_func() specializations have been eliminated.
54 // { dg-final { scan-tree-dump-not "fail_func" "optimized" } }