blob: 0de51bac95bc1f433844d63399578b98cc7298d5 [file] [log] [blame]
/* { dg-do run } */
#include <limits.h>
extern void abort (void);
extern void exit (int);
long long __attribute__((noinline)) f(int a)
{
return -(long long) a;
}
int
main()
{
if (f(0) != 0)
abort ();
if (f(1) != -(long long)1)
abort ();
if (f(-1) != -(long long)-1)
abort ();
if (f(INT_MIN) != -(long long)INT_MIN)
abort ();
if (f(INT_MAX) != -(long long)INT_MAX)
abort ();
exit (0);
}