summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/pr22429.c
blob: aa55b6e88acc6fdbbf7520aaf39cbc402b9aa219 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
extern void abort (void);

#define N	(1 << (sizeof(int) * __CHAR_BIT__ - 2))

int f(int n)
{
  if (-N <= n && n <= N-1)
    return 1;
  return 0;
}

int main ()
{
  if (f (N))
    abort ();
  return 0;
}