scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

0052-switch.c (499B)


      1 int x = 0;
      2 
      3 int
      4 main()
      5 {
      6 	switch(x)
      7 		return 1;
      8 	switch(x) {
      9 		default:
     10 			return 1;
     11 		case 0:
     12 			;
     13 	}
     14 	switch(x) {
     15 		case 1:
     16 			return 1;
     17 		case 2:
     18 			return 2;
     19 	}
     20 	switch(x)
     21 		case 0:
     22 			;
     23 	switch(x)
     24 		case 0:
     25 			switch(x) {
     26 				case 0:
     27 					goto next;
     28 				default:
     29 					return 1;
     30 			}
     31 	return 1;
     32 	next:
     33 	switch(x)
     34 		case 1:
     35 			return 1;
     36 	switch(x) {
     37 		{
     38 			x = 1 + 1;
     39 			foo:
     40 			case 1:
     41 				return 1;
     42 		}
     43 	}
     44 	switch(x) {
     45 		case 0:
     46 			return x;
     47 		case 1:
     48 			return 1;
     49 		default:
     50 			return 1;
     51 	}
     52 }