diagnostics: remove duplicate copies of diagnostic_kind_text
[official-gcc.git] / gcc / testsuite / gcc.target / s390 / nobp-table-jump-inline-z10.c
blob121751166d0a459fc996033ac8049e66acb68b9b
1 /* { dg-do run } */
2 /* { dg-options "-O3 -march=z10 -mzarch --save-temps -mindirect-branch-jump=thunk-inline -mindirect-branch-table" } */
4 /* case-values-threshold will be set to 20 by the back-end when jump
5 thunk are requested. */
7 int __attribute__((noipa)) foo1 (void) { return 1; }
8 int __attribute__((noipa)) foo2 (void) { return 2; }
9 int __attribute__((noipa)) foo3 (void) { return 3; }
10 int __attribute__((noipa)) foo4 (void) { return 4; }
11 int __attribute__((noipa)) foo5 (void) { return 5; }
12 int __attribute__((noipa)) foo6 (void) { return 6; }
13 int __attribute__((noipa)) foo7 (void) { return 7; }
14 int __attribute__((noipa)) foo8 (void) { return 8; }
15 int __attribute__((noipa)) foo9 (void) { return 9; }
16 int __attribute__((noipa)) foo10 (void) { return 10; }
17 int __attribute__((noipa)) foo11 (void) { return 11; }
18 int __attribute__((noipa)) foo12 (void) { return 12; }
19 int __attribute__((noipa)) foo13 (void) { return 13; }
20 int __attribute__((noipa)) foo14 (void) { return 14; }
21 int __attribute__((noipa)) foo15 (void) { return 15; }
22 int __attribute__((noipa)) foo16 (void) { return 16; }
23 int __attribute__((noipa)) foo17 (void) { return 17; }
24 int __attribute__((noipa)) foo18 (void) { return 18; }
25 int __attribute__((noipa)) foo19 (void) { return 19; }
26 int __attribute__((noipa)) foo20 (void) { return 20; }
29 int __attribute__((noipa))
30 bar (int a)
32 int ret = 0;
34 switch (a)
36 case 1: ret = foo1 (); break;
37 case 2: ret = foo2 (); break;
38 case 3: ret = foo3 (); break;
39 case 4: ret = foo4 (); break;
40 case 5: ret = foo5 (); break;
41 case 6: ret = foo6 (); break;
42 case 7: ret = foo7 (); break;
43 case 8: ret = foo8 (); break;
44 case 9: ret = foo9 (); break;
45 case 10: ret = foo10 (); break;
46 case 11: ret = foo11 (); break;
47 case 12: ret = foo12 (); break;
48 case 13: ret = foo13 (); break;
49 case 14: ret = foo14 (); break;
50 case 15: ret = foo15 (); break;
51 case 16: ret = foo16 (); break;
52 case 17: ret = foo17 (); break;
53 case 18: ret = foo18 (); break;
54 case 19: ret = foo19 (); break;
55 case 20: ret = foo20 (); break;
56 default:
57 __builtin_abort ();
60 return ret;
63 int
64 main ()
66 if (bar (3) != 3)
67 __builtin_abort ();
69 return 0;
72 /* 1 x bar
73 /* { dg-final { scan-assembler-times "exrl" 1 } } */
75 /* { dg-final { scan-assembler "section\t.s390_indirect_jump" } } */
76 /* { dg-final { scan-assembler-not "section\t.s390_indirect_call" } } */
77 /* { dg-final { scan-assembler-not "section\t.s390_return_fromreg" } } */
78 /* { dg-final { scan-assembler-not "section\t.s390_return_frommem" } } */