summaryrefslogtreecommitdiff
path: root/support/regression/tests/gcc-torture-execute-pr66940.c
blob: 2da23aba111651fa4303d2c4ee9272e5842d15ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
   pr66940.c from the execute part of the gcc torture tests.
 */

#include <testfwk.h>

long long
foo (long long ival)
{
 if (ival <= 0)
    return -0x7fffffffffffffffL - 1;

 return 0x7fffffffffffffffL;
}

void
testTortureExecute (void)
{
  ASSERT (foo (-1) == (-0x7fffffffffffffffL - 1));
  ASSERT (foo (1) == 0x7fffffffffffffffL);

  ASSERT (foo (-1) != (-0x7fffffff - 1));

  return;
}