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

            Bug ID: 69999
           Summary: [6 Regression] ICE in verify_loop_structure, at
                    cfgloop.c:1639 (error: loop with header 3 not in loop
                    tree) at -O3 or -Ofast
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc-6.0.0-alpha20160221 fails w/ the following reduced snippet at -O3 or
-Ofast:

int uh;

void
ha(void)
{
  while (uh) {
    for (uh = 0; uh < 1; ++uh) {
      uh = 0;
      if (uh != 0)
 ts:
        uh %= uh;
    }
    ++uh;
  }
  goto ts;
}

% gcc-6.0.0-alpha20160221 -c -O3 nh81gazb.c 
nh81gazb.c: In function 'ha':
nh81gazb.c:4:1: error: loop with header 3 not in loop tree
 ha(void)
 ^~
nh81gazb.c:4:1: internal compiler error: in verify_loop_structure, at
cfgloop.c:1639

Reply via email to