http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57122

             Bug #: 57122
           Summary: ICE in verify_loop_structure, at cfgloop.c:1647 (loop
                    n’s latch does not have an edge to its header !)
    Classification: Unclassified
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: antoine.balest...@gmail.com


Using GCC 4.9.0 as of 20130430 :

$ cat latch.c
unsigned a;
int b, c;

void f(void)
{
    if(a)
    {
        for(a = 0; a < 2; a++)
            a /= 7;

        for(;; a++)
        {
            if(a)
lbl1:
                b++;

            if(c)
                goto lbl1;
lbl2:
            ;
        }
    }

    goto lbl2;
}

$ xgcc -O2 -w latch.c
latch.c: In function ‘f’:
latch.c:4:6: error: loop 2’s latch does not have an edge to its header
 void f(void)
      ^
latch.c:4:6: internal compiler error: in verify_loop_structure, at
cfgloop.c:1647
0x61aba5 verify_loop_structure()
    ../../srcdir/gcc/cfgloop.c:1647
0x7fe2ad loop_optimizer_init(unsigned int)
    ../../srcdir/gcc/loop-init.c:110
0xa3cf4d do_pre
    ../../srcdir/gcc/tree-ssa-pre.c:4708
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

Reply via email to