Rename Value_Range to value_range.
[official-gcc.git] / gcc / testsuite / gcc.c-torture / compile / 981006-1.c
blob9c6687552ee97632dc7e1c4f6ee735d2c12c6913
1 /* Test that tablejump insns are correctly handled. If the compiler
2 loses track of the jump targets, it will report that x and y can be
3 used uninitialized.
5 This is broken in egcs 1998/10/06 for mips in pic mode. */
6 /* { dg-do assemble } */
7 /* For MIPS at least, pic is needed to trigger the problem. */
8 /* { dg-options "-w -Wuninitialized -Werror -fpic" } */
9 /* { dg-options "-w -Wuninitialized -Werror" { target { { rs6000-*-aix* powerpc*-*-aix* arm*-*-* fr30-*-* sh-*-hms h8300*-*-* cris-*-elf* mmix-*-* } || { ! fpic } } } } */
10 /* { dg-require-effective-target label_values } */
12 int foo (int a, int b)
14 __label__ z;
15 int x; /* { dg-bogus "warning: `.' might be used uninitialized in this function" } */
16 int y; /* { dg-bogus "warning: `.' might be used uninitialized in this function" } */
17 static void *p;
19 switch (a) {
20 case 2:
21 x = 4;
22 break;
23 case 4:
24 x = 6;
25 break;
26 case 8: case 10: case 13: case 11: case 17: case 19:
27 x = 7;
28 break;
29 default:
30 x = -1;
31 break;
33 switch (b) {
34 case 2:
35 y = 4;
36 break;
37 case 4:
38 y = 6;
39 break;
40 case 8: case 10: case 13: case 11: case 17: case 19:
41 y = 7;
42 break;
43 default:
44 y = -1;
45 break;
48 p = &&z;
49 return x * y;
51 int main (int argc, char *argv[])
53 return 1 == foo (argc, argc + 1);