summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/pr80707.C
blob: b3848b0eb5f1d4b396922f7e5fc5e493fcb1a8bb (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
// PR middle-end/80707 ICE: extra outgoing edge causes verify_flow_info error.
// { dg-do compile }
// { dg-options "-O3" } */

struct A {
  int m_fn1(int &) const;
};
int A::m_fn1(int &p1) const {
  int a[6];
  int b = 0;
  for (int i;; i++) {
    if (a[i])
      break;
    b++;
  }
  while (b) {
    int c;
    switch (b) {
    case 1:
      c = 0;
      break;
    case 5:
      c = a[0];
    }
    if (c)
      p1 = 0;
    b--;
  }

  return 0;
}