1 // Test to verify that attributes on distinct overloads of a function
2 // with the same name are properly looked up and applied.
4 // { dg-options "-Wall" }
9 int __attribute__ ((noreturn))
12 int __attribute__ ((warn_unused_result))
18 } // { dg-warning "\\\[-Wreturn-type]" }
27 foo (1, 2, 3); // { dg-warning "\\\[-Wunused-result]" }
28 } // { dg-warning "\\\[-Wreturn-type]" }
32 // Make sure an error doesn't trigger bogus warnings or an ICE.
33 foo (1, 2, 3, 4); // { dg-error "no matching function" }