1 // Bug c++/83871 - wrong code due to attributes on distinct template
3 // Test to verify that an explicit template specifialization does not
4 // "inherit" attribute deprecated from a primary template declared
7 // { dg-options "-Wall -fdump-tree-optimized" }
12 void fdeprecated_primary ();
14 // The primary isn't deprecated at this point so the declaration
15 // of its specialization should not be diagnosed.
17 void fdeprecated_primary<Special> (); // { dg-bogus "deprecated" }
20 void __attribute__ ((deprecated))
21 fdeprecated_primary ();
25 // Verify that uses of the now deprecacted primary are diagnosed.
26 fdeprecated_primary<void>(); // { dg-warning "deprecated" "bug 84542" { xfail *-*-* } }
27 fdeprecated_primary<int>(); // { dg-warning "deprecated" "bug 84542" { xfail *-*-* } }
32 // Verify that the use of the non-deprecated specializatoin
34 fdeprecated_primary<Special>();