diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/cet-notrack-3.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/cet-notrack-3.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/cet-notrack-3.c b/gcc/testsuite/gcc.target/i386/cet-notrack-3.c new file mode 100644 index 00000000000..5e124c7f95c --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/cet-notrack-3.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fcf-protection -mcet" } */ +/* { dg-final { scan-assembler-times "endbr32" 1 { target ia32 } } } */ +/* { dg-final { scan-assembler-times "endbr64" 1 { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler-times "notrack call\[ \t]+" 1 } } */ + +typedef void (*func_t) (void) __attribute__((nocf_check)); +extern func_t func; + +void +bar (void) +{ + func (); +} |