summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/arith-1.c
blob: 58df322e68aca188eed9cdfd72f25b93c47de6bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
unsigned
sat_add (unsigned i)
{
  unsigned ret = i + 1;
  if (ret < i)
    ret = i;
  return ret;
}

main ()
{
  if (sat_add (~0U) != ~0U)
    abort ();
  exit (0);
}