summaryrefslogtreecommitdiff
path: root/support/regression/tests/gcc-torture-execute-20031020-1.c
blob: e5f925d20b4833f52224a5536189d18369d1e38b (plain) (blame)
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
26
27
28
29
30
31
32
/*
   20031020-1.c from the execute part of the gcc torture tests.
 */

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c99
#endif

/* PR target/12654
   The Alpha backend tried to do a >= 1024 as (a - 1024) >= 0, which fails
   for very large negative values.  */
/* Origin: tg@swox.com  */

#include <limits.h>

void
foo (long x)
{
  if (x >= 1024)
    ASSERT (0);
}

void
testTortureExecute (void)
{
  foo (LONG_MIN);
  foo (LONG_MIN + 10000);
  return;
}