summaryrefslogtreecommitdiff
path: root/support/regression/tests/gcc-torture-execute-divcmp-5.c
blob: a6da10030d15937914412d18358e5111daa03dc8 (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
33
34
35
36
/*
divcmp-5.c from the execute part of the gcc torture tests.
*/

#include <testfwk.h>

/* PR middle-end/26561 */

int always_one_1 (int a)
{
  if (a/100 >= -999999999)
    return 1;
  else
    return 0;
}

int always_one_2 (int a)
{
  if (a/100 < -999999999)
    return 0;
  else
    return 1;
}

void
testTortureExecute (void)
{
  if (always_one_1 (0) != 1)
    ASSERT (0);

  if (always_one_2 (0) != 1)
    ASSERT (0);

  return;
}