Bug 40317 - verify_flow_info ICE with nested functions
Summary: verify_flow_info ICE with nested functions
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2009-05-31 23:25 UTC by Ian Lance Taylor
Modified: 2012-02-04 02:45 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2012-02-03 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Lance Taylor 2009-05-31 23:25:05 UTC
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.
Comment 1 Richard Biener 2009-06-05 15:43:07 UTC
Confirmed.