1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -mharden-sls=return" } */
3 /* { dg-additional-options "-fno-pic" { target { ! *-*-darwin* } } } */
4
5 typedef void (*dispatch_t)(long offset);
6
7 dispatch_t dispatch;
8
9 int
10 male_indirect_jump (long offset)
11 {
12 dispatch(offset);
13 return 0;
14 }
15
16 /* { dg-final { scan-assembler-times "ret" 1 } } */
17 /* { dg-final { scan-assembler-times "int3" 1 } } */