1 /* { dg-do run } */ 2 3 #include <limits.h> 4 5 extern void abort (void); 6 extern void exit (int); 7 f(int a)8long long __attribute__((noinline)) f(int a) 9 { 10 return -(long long) a; 11 } 12 13 int main()14main() 15 { 16 if (f(0) != 0) 17 abort (); 18 19 if (f(1) != -(long long)1) 20 abort (); 21 22 if (f(-1) != -(long long)-1) 23 abort (); 24 25 if (f(INT_MIN) != -(long long)INT_MIN) 26 abort (); 27 28 if (f(INT_MAX) != -(long long)INT_MAX) 29 abort (); 30 31 exit (0); 32 } 33