| 1 |
// PR c++/89325 |
| 2 |
// { dg-do compile } |
| 3 |
// { dg-options "-Wattributes" } |
| 4 |
|
| 5 |
int foo (int) { return 0; } // { dg-bogus "previous definition" } |
| 6 |
int bar (int) { return 0; } // { dg-bogus "previous definition" } |
| 7 |
int baz (int) { return 0; } // { dg-message "previous definition" } |
| 8 |
__attribute__((optimize (0))) int bar (long); // { dg-bogus "optimization attribute on '\[^\n\r]*' follows definition but the attribute doesn.t match" } |
| 9 |
#pragma GCC optimize ("-fno-ipa-cp-clone") |
| 10 |
int foo (long); // { dg-bogus "optimization attribute on '\[^\n\r]*' follows definition but the attribute doesn.t match" } |
| 11 |
int baz (int); // { dg-warning "optimization attribute on '\[^\n\r]*' follows definition but the attribute doesn.t match" } |