1 /* On H8/300 port, NOTICE_UPDATE_CC had a bug that causes the final 2 pass to remove test insns that should be kept. */ 3 4 unsigned short test1(unsigned short w)5test1 (unsigned short w) 6 { 7 if ((w & 0xff00) == 0) 8 { 9 if (w == 0) 10 w = 2; 11 } 12 return w; 13 } 14 15 unsigned long test2(unsigned long w)16test2 (unsigned long w) 17 { 18 if ((w & 0xffff0000) == 0) 19 { 20 if (w == 0) 21 w = 2; 22 } 23 return w; 24 } 25 26 int test3(unsigned short a)27test3 (unsigned short a) 28 { 29 if (a & 1) 30 return 1; 31 else if (a) 32 return 1; 33 else 34 return 0; 35 } 36 37 int main()38main () 39 { 40 if (test1 (1) != 1) 41 abort (); 42 43 if (test2 (1) != 1) 44 abort (); 45 46 if (test3 (2) != 1) 47 abort (); 48 49 exit (0); 50 } 51