]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.target/i386/cet-notrack-1a.c
Wrap option names in gcc internal messages with %< and %>.
[thirdparty/gcc.git] / gcc / testsuite / gcc.target / i386 / cet-notrack-1a.c
CommitLineData
9091ccd2 1/* { dg-do compile } */
ec9e5c79 2/* { dg-options "-O0 -fcf-protection=none" } */
9091ccd2 3/* { dg-final { scan-assembler-not "endbr" } } */
4/* { dg-final { scan-assembler-not "notrack call\[ \t]+" } } */
5
2f6d557f 6int func (int a) __attribute__ ((nocf_check)); /* { dg-warning "'nocf_check' attribute ignored. Use '-fcf-protection' option to enable it" } */
7int (*fptr) (int a) __attribute__ ((nocf_check)); /* { dg-warning "'nocf_check' attribute ignored. Use '-fcf-protection' option to enable it" } */
9091ccd2 8
9int foo (int arg)
10{
11 int a, b;
12 a = func (arg);
13 b = (*fptr) (arg);
14 return a+b;
15}
16
17int __attribute__ ((nocf_check))
18func (int arg)
2f6d557f 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" } */
9091ccd2 21 return arg*(*fptrl)(arg);
22}