2018-04-30 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr36881.c
blob3f3249e015d6c6aff188ecd149bb0773b51f75ad
1 /* PR tree-optimization/36881 */
2 /* { dg-do compile { target fpic } } */
3 /* { dg-options "-O2 -fpic -fdump-tree-switchconv-all" } */
5 const char *foo (int i)
7 const char *p;
8 switch (i)
10 case 0:
11 case 6: p = ""; break;
12 case 1:
13 case 7: p = "abc"; break;
14 case 2:
15 case 8: p = "def"; break;
16 case 9: p = "ghi"; break;
17 case 5: p = "jkl"; break;
18 case 3: p = "mno"; break;
19 default: p = "prq"; break;
21 return p;
24 /* { dg-final { scan-assembler-not "CSWTCH" } } */
25 /* { dg-final { scan-tree-dump "need runtime relocations" "switchconv" } } */