1 /* { dg-do compile } */
2 /* { dg-additional-options "-fcf-protection=none" } */
3 
4 int  foo (void) __attribute__ ((nocf_check)); /* { dg-warning "'nocf_check' attribute ignored" } */
5 void (*foo1) (void) __attribute__((nocf_check)); /* { dg-warning "'nocf_check' attribute ignored" } */
6 void (*foo2) (void);
7 
8 int
9 foo (void) /* The function's address is not tracked.  */
10 {
11   /* This call site is not tracked for
12      control-flow instrumentation.  */
13   (*foo1)();
14 
15   foo1 = foo2;
16   /* This call site is still not tracked for
17      control-flow instrumentation.  */
18   (*foo1)();
19 
20   /* This call site is tracked for
21      control-flow instrumentation.  */
22   (*foo2)();
23 
24   foo2 = foo1;
25   /* This call site is still tracked for
26      control-flow instrumentation.  */
27   (*foo2)();
28 
29   return 0;
30 }
31