1 /*
2 20011223-1.c from the execute part of the gcc torture tests.
3 */
4
5 #include <testfwk.h>
6
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
10
11 /* Origin: Joseph Myers <jsm28@cam.ac.uk>. */
12 /* Case labels in a switch statement are converted to the promoted
13 type of the controlling expression, not an unpromoted version.
14 Reported as PR c/2454 by
15 Andreas Krakowczyk <Andreas.Krakowczyk@fujitsu-siemens.com>. */
16
17 static int i;
18
19 void
testTortureExecute(void)20 testTortureExecute (void)
21 {
22 i = -1;
23 switch ((signed char) i) {
24 case 255:
25 ASSERT (0);
26 default:
27 return;
28 }
29 }
30
31