summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/g++.dg/expr/compound-asn1.C
blob: 194235c64af518831b8eb6fcd5569a6d486ff9d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// PR c++/45437
// { dg-options -Wsequence-point }
// { dg-do run }

bool f(bool& b) {
  b = true;
  return false;
}

int main() {
  bool b = false;
  b |= f(b);
  if (!b)
    return 1;
}
OpenPOWER on IntegriCloud