aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/harden-sls-3.c
blob: 1a6056b6d7b3ab52430354a0b2fc0d1d6a3f4d11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do compile } */
/* { dg-options "-O2 -mindirect-branch=thunk -mharden-sls=all" } */
/* { dg-additional-options "-fno-pic" { target { ! *-*-darwin* } } } */

extern void (*fptr) (void);

void
foo (void)
{
  fptr ();
}

/* { dg-final { scan-assembler "jmp\[ \t\]+_?__x86_indirect_thunk_(r|e)ax" } } */
/* { dg-final { scan-assembler-times "int3" 2 } } */