PR tree-optimization/86401
[official-gcc.git] / gcc / testsuite / c-c++-common / attributes-3.c
blobc2be4bbfbeacdfcb2a01c6da82d2a92ccfaa6e24
1 /* PR c++/71024 */
2 /* { dg-do compile } */
3 /* { dg-prune-output "declared but never defined" } */
5 void
6 fn0 (void) /* { dg-message "previous definition" } */
9 extern void __attribute__((optimize ("O2"))) fn0 (void); /* { dg-warning "optimization attribute" } */
11 extern __attribute__((noinline)) int fn1 (void); /* { dg-message "previous declaration" } */
12 extern inline int fn1 (void); /* { dg-warning "inline declaration of" } */
14 extern inline int fn2 (void); /* { dg-message "previous declaration" } */
15 extern __attribute__((noinline)) int fn2 (void); /* { dg-warning "attribute .noinline. follows inline declaration" } */
17 extern __attribute__((always_inline)) int fn3 (void); /* { dg-message "previous declaration" } */
18 extern __attribute__((noinline)) int fn3 (void); /* { dg-warning "attribute .noinline." } */
20 extern __attribute__((noinline)) int fn4 (void); /* { dg-message "previous declaration" } */
21 extern __attribute__((always_inline)) int fn4 (void); /* { dg-warning "attribute .always_inline." } */
23 extern __attribute__((hot)) int fn5 (void); /* { dg-message "previous declaration" } */
24 extern __attribute__((cold)) int fn5 (void); /* { dg-warning "attribute .cold." } */
26 extern __attribute__((cold)) int fn6 (void); /* { dg-message "previous declaration" } */
27 extern __attribute__((hot)) int fn6 (void); /* { dg-warning "attribute .hot." } */