Fix ICE in substring-handling building 502.gcc_r (PR 87562)
[official-gcc.git] / gcc / testsuite / c-c++-common / Wimplicit-fallthrough-19.c
blobb7a37910db3d1bdb2da1eadeeaff90ae16e5ac48
1 /* PR c/7652 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wimplicit-fallthrough" } */
5 /* Testing non-case labels. */
7 int foo (int);
9 void
10 f1 (int i)
12 switch (i)
14 case 0:
15 foo (1);
16 L1:
17 foo (2);
20 switch (i)
22 case 0:
23 foo (1); /* { dg-warning "statement may fall through" } */
24 L2:
25 case 2:
26 foo (2);
29 switch (i)
31 case 0:
32 foo (1); /* { dg-warning "statement may fall through" } */
33 case 2:
34 L3:
35 foo (2);
38 switch (i)
40 case 0:
41 foo (1); /* { dg-warning "statement may fall through" } */
42 L4:
43 case 2:
44 L5:
45 foo (2);
48 switch (i)
50 case 0:
51 switch (i)
53 case 1:
54 foo (2);
55 L6:
56 foo (3);
60 switch (i)
62 case 0:
63 switch (i)
65 case 1:
66 foo (2); /* { dg-warning "statement may fall through" } */
67 L7:
68 case 2:
69 foo (3);
73 switch (i)
75 case 0:
76 switch (i)
78 case 1:
79 foo (2); /* { dg-warning "statement may fall through" } */
80 case 2:
81 L8:
82 foo (3);