Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / c-c++-common / Wimplicit-fallthrough-20.c
blobbc0cd0fe58014e7ad0e7df57eb6df29c466c786d
1 /* PR c/7652 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wimplicit-fallthrough" } */
5 int
6 f (int i)
8 switch (i)
10 case -1:
11 __attribute__((fallthrough));
12 default:
13 __attribute__((fallthrough));
14 case 1:
15 return 6;
16 case 2 ... 4:
17 __attribute__((fallthrough));
18 case 5:
19 return 7;
21 return 0;
24 int
25 g (int i)
27 switch (i)
29 case -1:
30 __attribute__((used)); /* { dg-warning "empty declaration|ignored" } */
31 default:
32 __attribute__((used)); /* { dg-warning "empty declaration|ignored" } */
33 case 1:
34 return 6;
35 case 2 ... 4:
36 __attribute__((used)); /* { dg-warning "empty declaration|ignored" } */
37 case 5:
38 return 7;
40 return 0;