1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk " } */
3 /* { dg-additional-options "-fno-pic" { target { ! *-*-darwin* } } } */
4 
5 extern void (*bar) (void);
6 
7 int
foo(void)8 foo (void)
9 {
10   bar ();
11   return 0;
12 }
13 
14 /* { dg-final { scan-assembler-not "jmp\[ \t\]*_?__x86_return_thunk" } } */
15 /* { dg-final { scan-assembler-times {\tpause} 1 } } */
16 /* { dg-final { scan-assembler-times {\tlfence} 1 } } */
17 /* { dg-final { scan-assembler {jmp[ \t]*\.?LIND} } } */
18 /* { dg-final { scan-assembler {call[ \t]*\.?LIND} } } */
19 /* { dg-final { scan-assembler "call\[ \t\]*_?__x86_indirect_thunk_(r|e)ax" } } */
20 /* { dg-final { scan-assembler "_?__x86_indirect_thunk_(r|e)ax:" } } */
21 /* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
22