When I compile this C code with an i686-unknown-linux-gnu native mainline
compiler, I get an ICE.

int
main ()
{
  int f1 ()
  {
    __label__ lab;

    int f2 ()
    {
      goto lab;
    }

    return f2 () + f2 ();

  lab:
    return 2;
  }

  if (f1 () != 2)
    abort ();
  exit (0);
}

foo.c: In function ‘main’:
foo.c:20: warning: incompatible implicit declaration of built-in function
‘abort’
foo.c:21: warning: incompatible implicit declaration of built-in function
‘exit’
foo.c: In function ‘f1’:
foo.c:22: error: label 
<L0> has incorrect context in bb 5foo.c:22: internal compiler error:
verify_flow_info failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


-- 
           Summary: verify_flow_info ICE with nested functions
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ian at airs dot com


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

Reply via email to