111
|
1 /* { dg-do compile } */
|
|
2
|
|
3 int func (int) __attribute__ ((nocf_check)); /* { dg-warning "'nocf_check' attribute ignored" } */
|
|
4 int (*fptr) (int) __attribute__ ((nocf_check)); /* { dg-warning "'nocf_check' attribute ignored" } */
|
|
5 typedef void (*nocf_check_t) (void) __attribute__ ((nocf_check)); /* { dg-warning "'nocf_check' attribute ignored" } */
|
|
6
|
|
7 int
|
|
8 foo1 (int arg)
|
|
9 {
|
|
10 return func (arg) + fptr (arg);
|
|
11 }
|
|
12
|
|
13 void
|
|
14 foo2 (void (*foo) (void))
|
|
15 {
|
|
16 void (*func) (void) __attribute__((nocf_check)) = foo; /* { dg-warning "'nocf_check' attribute ignored" } */
|
|
17 func ();
|
|
18 }
|
|
19
|
|
20 void
|
|
21 foo3 (nocf_check_t foo)
|
|
22 {
|
|
23 foo ();
|
|
24 }
|
|
25
|
|
26 void
|
|
27 foo4 (void (*foo) (void) __attribute__((nocf_check))) /* { dg-warning "'nocf_check' attribute ignored" } */
|
|
28 {
|
|
29 foo ();
|
|
30 }
|