summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr67690.c
blob: 491de516f3747c7ac127ad9997129de4a7d57907 (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
/* { dg-do run } */

const int c1 = 1;
const int c2 = 2;

int
check (int i)
{
  int j;
  if (i >= 0)
    j = c2 - i;
  else
    j = c2 - i;
  return c2 - c1 + 1 > j;
}

int invoke (int *pi) __attribute__ ((noinline,noclone));
int
invoke (int *pi)
{
  return check (*pi);
}

int
main ()
{
  int i = c1;
  int ret = invoke (&i);
  if (!ret)
    __builtin_abort ();
  return 0;
}