aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/pr100774.C
blob: 63320ef73fca98b216230db1b9f9970bf58d0302 (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
/* { dg-do compile } */
/* { dg-options "-O2 -fno-tree-forwprop -fcompare-debug  " } */

extern void __attribute__((noreturn)) error();

int x;

static inline int bar(void) {
  char n = 1;
  int i = x & 1U << n - 1;
  return i;
}

void foo()
{
  int a = bar();
  for (;;) {
    bool b;
    int d = a;
    b = a < 2;
    if (!b)
      error();
  }
}