1 /* { dg-do compile { target { *-*-linux* && { ! x32 } } } } */
2 /* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
3 
4 void bar (char *);
5 char buf[10];
6 
7 void
foo(void)8 foo (void)
9 {
10   bar (buf);
11 }
12 
13 /* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" } } */
14 /* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd_rax" { target lp64 } } } */
15 /* { dg-final { scan-assembler "bnd call\[ \t\]*__x86_indirect_thunk_bnd_eax" { target ia32 } } } */
16 /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
17 /* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */
18 /* { dg-final { scan-assembler "bnd ret" } } */
19 /* { dg-final { scan-assembler {\tpause} } } */
20 /* { dg-final { scan-assembler {\tlfence} } } */
21