annotate gcc/testsuite/c-c++-common/attributes-3.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* PR c++/71024 */
kono
parents:
diff changeset
2 /* { dg-do compile } */
kono
parents:
diff changeset
3 /* { dg-prune-output "declared but never defined" } */
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 void
kono
parents:
diff changeset
6 fn0 (void) /* { dg-message "previous definition" } */
kono
parents:
diff changeset
7 {
kono
parents:
diff changeset
8 }
kono
parents:
diff changeset
9 extern void __attribute__((optimize ("O2"))) fn0 (void); /* { dg-warning "optimization attribute" } */
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 extern __attribute__((noinline)) int fn1 (void); /* { dg-message "previous declaration" } */
kono
parents:
diff changeset
12 extern inline int fn1 (void); /* { dg-warning "inline declaration of" } */
kono
parents:
diff changeset
13
kono
parents:
diff changeset
14 extern inline int fn2 (void); /* { dg-message "previous declaration" } */
kono
parents:
diff changeset
15 extern __attribute__((noinline)) int fn2 (void); /* { dg-warning "attribute noinline follows inline declaration" } */
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17 extern __attribute__((always_inline)) int fn3 (void); /* { dg-message "previous declaration" } */
kono
parents:
diff changeset
18 extern __attribute__((noinline)) int fn3 (void); /* { dg-warning "attribute .noinline. follows declaration with attribute .always_inline." } */
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 extern __attribute__((noinline)) int fn4 (void); /* { dg-message "previous declaration" } */
kono
parents:
diff changeset
21 extern __attribute__((always_inline)) int fn4 (void); /* { dg-warning "attribute .always_inline. follows declaration with attribute .noinline." } */
kono
parents:
diff changeset
22
kono
parents:
diff changeset
23 extern __attribute__((hot)) int fn5 (void); /* { dg-message "previous declaration" } */
kono
parents:
diff changeset
24 extern __attribute__((cold)) int fn5 (void); /* { dg-warning "attribute .cold. follows declaration with attribute .hot." } */
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 extern __attribute__((cold)) int fn6 (void); /* { dg-message "previous declaration" } */
kono
parents:
diff changeset
27 extern __attribute__((hot)) int fn6 (void); /* { dg-warning "attribute .hot. follows declaration with attribute .cold." } */