aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/cet-notrack-7.c
blob: ddfa950ec0cc762c9b920300ae4a63b2de6ba063 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* Check the notrack prefix is not generated for direct call.  */
/* { dg-do compile } */
/* { dg-options "-O -fcf-protection" } */
/* { 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]+.*foo" 0 } } */
/* { dg-final { scan-assembler-times "\tcall\[ \t]+.*foo" 1 } } */

extern void foo (void) __attribute__((nocf_check));

void
bar (void)
{
  foo ();
}