* tree-ssa-loop-manip.c (split_loop_exit_edge): Return the new block.
[official-gcc.git] / gcc / testsuite / gcc.dg / pr20017.c
blob1fd6d586ec75e21651b1da86c70bb6fea8411b2d
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-*-* x86_64-*-* } && 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;