2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20011223-1.c
blob18fb72089278a5702146b7842a87838f34883a4e
1 /* Origin: Joseph Myers <jsm28@cam.ac.uk>. */
2 /* Case labels in a switch statement are converted to the promoted
3 type of the controlling expression, not an unpromoted version.
4 Reported as PR c/2454 by
5 Andreas Krakowczyk <Andreas.Krakowczyk@fujitsu-siemens.com>. */
7 extern void exit (int);
8 extern void abort (void);
10 static int i;
12 int
13 main (void)
15 i = -1;
16 switch ((signed char) i) {
17 case 255:
18 abort ();
19 default:
20 exit (0);