PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 920721-4.c
blob805918b2aa3dcd4a0ddcc765a5e2fd1772a8538b
1 /* { dg-require-effective-target label_values } */
3 int try (int num) {
4 __label__ lab1, lab2, lab3, lab4, lab5, lab6, default_lab;
6 void *do_switch (int num) {
7 switch(num) {
8 case 1:
9 return &&lab1;
10 case 2:
11 return &&lab2;
12 case 3:
13 return &&lab3;
14 case 4:
15 return &&lab4;
16 case 5:
17 return &&lab5;
18 case 6:
19 return &&lab6;
20 default:
21 return &&default_lab;
25 goto *do_switch (num);
27 lab1:
28 return 1;
30 lab2:
31 return 2;
33 lab3:
34 return 3;
36 lab4:
37 return 4;
39 lab5:
40 return 5;
42 lab6:
43 return 6;
45 default_lab:
46 return -1;
49 main()
51 int i;
52 for (i = 1; i <= 6; i++)
54 if (try (i) != i)
55 abort();
57 exit(0);