* gcc.dg/ucnid-[23456].c: XFAIL on AIX.
[official-gcc.git] / gcc / testsuite / gcc.dg / pr20017.c
blob16bd72b315d00cb8b37577f287ab3935b2b44072
1 /* PR rtl-optimization/20017
3 After CSE/GCSE folds a switch statement to an unconditional jump,
4 cfg_cleanup did not remove a dead jump table, confusing the CFG
5 layout code later on. */
7 /* { dg-do compile } */
8 /* { dg-options "-O1" } */
9 /* { dg-options "-O1 -march=i386" { target { i?86-*-* && ilp32 } } } */
11 int
12 foo (int *buf, int *p)
14 int result;
15 const int *tmp;
17 if (*buf)
18 return 1;
20 result = 2;
21 *buf = 2;
22 tmp = buf;
23 switch (*tmp)
25 case 3:
26 case 4:
27 case 6:
28 case 14:
29 return 1;
31 case 0:
32 result = *p;
34 /* Fall through. */
35 default:
36 if (result)
37 return 1;
40 return 0;