PR rtl-optimization/87918
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / indirect-thunk-attr-8.c
blobd730d31bda1ef53cada63e190a209c49df00f40a
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
4 void func0 (void);
5 void func1 (void);
6 void func2 (void);
7 void func3 (void);
8 void func4 (void);
9 void func4 (void);
10 void func5 (void);
12 __attribute__ ((indirect_branch("keep")))
13 void
14 bar (int i)
16 switch (i)
18 default:
19 func0 ();
20 break;
21 case 1:
22 func1 ();
23 break;
24 case 2:
25 func2 ();
26 break;
27 case 3:
28 func3 ();
29 break;
30 case 4:
31 func4 ();
32 break;
33 case 5:
34 func5 ();
35 break;
39 /* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
40 /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
41 /* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
42 /* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */