Fix bootstrap failure for bare metal due to autoconf link tests
[official-gcc.git] / gcc / testsuite / c-c++-common / Wimplicit-fallthrough-21.c
blob6092a9018f33fc808423831cfe61decfe63c832a
1 /* PR c/7652 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wimplicit-fallthrough" } */
5 int
6 f (int i)
8 switch (i)
10 case 0:
11 i++;
12 __attribute__((fallthrough));
13 lab1:
14 case 1:
15 i++;
16 __attribute__((fallthrough)); /* { dg-warning "not preceding" } */
17 lab2:
18 --i;
19 break;
20 case 3:
21 i++;
22 break;
24 return 0;