diff options
author | Richard Biener <rguenther@suse.de> | 2014-12-15 12:20:10 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2014-12-15 12:20:10 +0000 |
commit | 024660c5942a95a54712adc9e91953ca83081c07 (patch) | |
tree | 1c45e9929d0b876cbe17e488a1ebcb66c19eccea /gcc/cfgloop.c | |
parent | f52e1d24fd49da929f731b0477106aadb3120fc4 (diff) | |
download | gcc-024660c5942a95a54712adc9e91953ca83081c07.zip gcc-024660c5942a95a54712adc9e91953ca83081c07.tar.gz gcc-024660c5942a95a54712adc9e91953ca83081c07.tar.bz2 |
re PR middle-end/64246 (ICE building libada for Windows due to NULL loop header)
2014-12-15 Richard Biener <rguenther@suse.de>
PR middle-end/64246
* cfgloop.c (mark_loop_for_removal): Make safe against multiple
invocations on the same loop.
* gnat.dg/opt46.adb: New testcase.
* gnat.dg/opt46.ads: Likewise.
* gnat.dg/opt46_pkg.adb: Likewise.
* gnat.dg/opt46_pkg.ads: Likewise.
From-SVN: r218746
Diffstat (limited to 'gcc/cfgloop.c')
-rw-r--r-- | gcc/cfgloop.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cfgloop.c b/gcc/cfgloop.c index 5c5cedc..40fb5a1 100644 --- a/gcc/cfgloop.c +++ b/gcc/cfgloop.c @@ -1928,9 +1928,10 @@ bb_loop_depth (const_basic_block bb) void mark_loop_for_removal (loop_p loop) { + if (loop->header == NULL) + return; loop->former_header = loop->header; loop->header = NULL; loop->latch = NULL; loops_state_set (LOOPS_NEED_FIXUP); } - |