1 /* PR rtl-optimization/51667 */ 2 /* Testcase by Uros Bizjak <ubizjak@gmail.com> */ 3 4 extern void abort (void); 5 6 void __attribute__((noinline,noclone)) bar(int a)7bar (int a) 8 { 9 if (a != -1) 10 abort (); 11 } 12 13 void __attribute__((noinline,noclone)) foo(short * a,int t)14foo (short *a, int t) 15 { 16 short r = *a; 17 18 if (t) 19 bar ((unsigned short) r); 20 else 21 bar ((signed short) r); 22 } 23 24 short v = -1; 25 main(void)26int main(void) 27 { 28 foo (&v, 0); 29 return 0; 30 } 31