summaryrefslogtreecommitdiff
path: root/support/regression/tests/gcc-torture-execute-20050104-1.c
blob: d80a402ee1a2702b8f9c484c434e7049569fc9bb (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
   20050104-1.c from the execute part of the gcc torture suite.
 */

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c99
#endif

#include <limits.h>

// Some ports do not support long long yet.
#if !defined(__SDCC_pic14) && !defined(__SDCC_pic16)

/* PR tree-optimization/19060 */

static
long long min ()
{
  return -LLONG_MAX - 1;
}

void
foo (long long j)
{
  if (j > 10 || j < min ())
    ASSERT (0);
}
#endif

void
testTortureExecute (void)
{
// Some ports do not support long long yet.
#if !defined(__SDCC_pic14) && !defined(__SDCC_pic16)
  foo (10);
  return;
#endif
}