blob: 50fe0db7d0c8cb132fddffa82db93976ffcaf5b9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
/* { 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-not "\tcall\[ \t]+" } } */
/* { dg-final { scan-assembler-times "notrack call\[ \t]+" 1 } } */
int (*fptr) (int) __attribute__ ((nocf_check));
int
foo (int arg)
{
int a;
a = (*fptr) (arg); /* notrack call. */
return arg+a;
}
|