1 /* PR target/r84530 */
2 /* { dg-do compile { target ia32 } } */
3 /* { dg-options "-O2 -mfunction-return=thunk-extern" } */
4
5 struct s { _Complex unsigned short x; };
6 struct s gs = { 100 + 200i };
foo(void)7 struct s __attribute__((noinline)) foo (void) { return gs; }
8
9 /* { dg-final { scan-assembler-times "popl\[\\t \]*%ecx" 1 { target { ! *-*-darwin* } } } } */
10 /* { dg-final { scan-assembler "lea\[l\]?\[\\t \]*4\\(%esp\\), %esp" { target { ! *-*-darwin* } } } } */
11 /* { dg-final { scan-assembler "jmp\[ \t\]*_?__x86_return_thunk_ecx" { target { ! *-*-darwin* } } } } */
12 /* { dg-final { scan-assembler {call[ \t]*___x86.get_pc_thunk.cx} { target { *-*-darwin* } } } } */
13 /* { dg-final { scan-assembler {jmp[ \t]*___x86_return_thunk} { target { *-*-darwin* } } } } */
14 /* { dg-final { scan-assembler-not {jmp[ \t]*\.?LIND} } } */
15 /* { dg-final { scan-assembler-not {call[ \t]*\.?LIND} } } */
16 /* { dg-final { scan-assembler-not {\tpause} } } */
17 /* { dg-final { scan-assembler-not {\tlfence} } } */
18