aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr103845.c
blob: 45ab518d07c9a9c0bbbc18bf6c65d67d13c6b927 (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
/* { dg-do compile } */
/* { dg-options "-O1 -fharden-compares -fno-ipa-pure-const" } */

int
baz (void);

__attribute__ ((returns_twice)) void
bar (void)
{
}

int
quux (int y, int z)
{
  return (y || z >= 0) ? y : z;
}

int
foo (int x)
{
  int a = 0, b = x == a;

  bar ();

  if (!!baz () < quux (b, a))
    ++x;

  return x;
}