aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/divconst-2.c
blob: d3adaf3a0af4de6351d807a4424b5fa768665ca3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
long
f (long x)
{
  return x / (-0x7fffffffL - 1L);
}

main ()
{
  if (f (-1L) != 0L || f (0x7fffffffL) != 0L || f (-0x7fffffffL - 1L) != 1l)
    abort ();
  exit (0);
}