aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr116343.c
blob: 287a09707ec43061c57167c69845371d6e08ac71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// { dg-additional-options "-fschedule-insns -fno-thread-jumps -fno-dce" }
/* { dg-require-effective-target scheduling } */

int a, b, c;
volatile int d;
int e(int f, int g) { return g > 1 ? 1 : f >> g; }
int main() {
  int *i = &a;
  long j[1];
  if (a)
    while (1) {
      a ^= 1;
      if (*i)
        while (1)
          ;
      b = c && e((d, 1) >= 1, j[0]);
    }
  return 0;
}