1 /* { dg-do compile { target *-*-linux* } } */
2 /* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-extern" } */
3
4 extern void bar (void);
5
6 void
foo(void)7 foo (void)
8 {
9 bar ();
10 }
11
12 /* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" { target x32 } } } */
13 /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target x32 } } } */
14 /* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" { target { ! x32 } } } } */
15 /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { ! x32 } } } } */
16 /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
17 /* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
18 /* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
19