https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87896

            Bug ID: 87896
           Summary: ICE in verify_flow_info failed
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: law at gcc dot gnu.org
  Target Milestone: ---

Following causes ICE:

$ cat table.i
int a;

void f();
int e();

void b() {
  int c = 1;
  for (; c <= 3;) {
    int d = e() && !0;
    switch (c)
    case 1:
      if (d)
      case 2:
      case 3:
        f();
    if (a)
      c++;
  }
}

$ gcc table.i -c -O2
table.i: In function ‘b’:
table.i:19:1: error: wrong amount of branch edges after conditional jump in bb
10
   19 | }
      | ^
table.i:19:1: error: wrong number of branch edges after unconditional jump in
bb 9
during RTL pass: outof_cfglayout
table.i:19:1: internal compiler error: verify_flow_info failed
0x8d3f2b verify_flow_info()
        ../../gcc/cfghooks.c:265
0x8ed7e9 checking_verify_flow_info
        ../../gcc/cfghooks.h:198
0x8ed7e9 cfg_layout_finalize()
        ../../gcc/cfgrtl.c:4350
0x8ed971 execute
        ../../gcc/cfgrtl.c:3606

Started on trunk with r264491.

Reply via email to