Warn pointer to signed integer cast for ilp32
[official-gcc.git] / gcc / testsuite / gcc.dg / switch-4.c
blobf2d85300d90ffdfc164230307e023ba4ec307f2b
1 /* PR middle-end/17657 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2" } */
5 extern signed char foo(int);
7 void bar (void)
9 signed char tmp = foo (0);
10 int t1 = tmp;
11 switch (t1)
13 case 1: foo (1); break;
14 case 2: foo (2); break;
15 case 3: foo (3); break;
16 case 4: foo (4); break;
17 case 5: foo (5); break;
18 case 6: foo (6); break;
19 case 7: foo (7); break;
20 case 255: foo (8); break;
21 default: break;