1 /* { dg-do compile } */
2 /* { dg-options "-O0 -fcf-protection=none" } */
3 /* { dg-final { scan-assembler-not "endbr" } } */
4 /* { dg-final { scan-assembler-not "notrack call\[ \t]+" } } */
6 int func (int a
) __attribute__ ((nocf_check
)); /* { dg-warning "'nocf_check' attribute ignored. Use -fcf-protection option to enable it" } */
7 int (*fptr
) (int a
) __attribute__ ((nocf_check
)); /* { dg-warning "'nocf_check' attribute ignored. Use -fcf-protection option to enable it" } */
17 int __attribute__ ((nocf_check
))
19 { /* { dg-warning "'nocf_check' attribute ignored. Use -fcf-protection option to enable it" } */
20 int (*fptrl
) (int a
) __attribute__ ((nocf_check
)); /* { dg-warning "'nocf_check' attribute ignored. Use -fcf-protection option to enable it" } */
21 return arg
*(*fptrl
)(arg
);