1 /* PR tree-optimization/56899 */ 2 3 #if __SIZEOF_INT__ == 4 && __CHAR_BIT__ == 8 4 __attribute__((noinline, noclone)) void f1(int v)5f1 (int v) 6 { 7 int x = -214748365 * (v - 1); 8 if (x != -1932735285) 9 __builtin_abort (); 10 } 11 12 __attribute__((noinline, noclone)) void f2(int v)13f2 (int v) 14 { 15 int x = 214748365 * (v + 1); 16 if (x != -1932735285) 17 __builtin_abort (); 18 } 19 20 __attribute__((noinline, noclone)) void f3(unsigned int v)21f3 (unsigned int v) 22 { 23 unsigned int x = -214748365U * (v - 1); 24 if (x != -1932735285U) 25 __builtin_abort (); 26 } 27 28 __attribute__((noinline, noclone)) void f4(unsigned int v)29f4 (unsigned int v) 30 { 31 unsigned int x = 214748365U * (v + 1); 32 if (x != -1932735285U) 33 __builtin_abort (); 34 } 35 #endif 36 37 int main()38main () 39 { 40 #if __SIZEOF_INT__ == 4 && __CHAR_BIT__ == 8 41 f1 (10); 42 f2 (-10); 43 f3 (10); 44 f4 (-10U); 45 #endif 46 return 0; 47 } 48