aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfg.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2018-04-19 13:53:06 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2018-04-19 13:53:06 +0000
commitca98e4c5d0e87b5305ab30591509ffc64300abd4 (patch)
tree543ad182909d71130092764c0c89346216eb9e68 /gcc/cfg.c
parent19986382015e2aa8dc539bf31065af4bdff5ce84 (diff)
downloadgcc-ca98e4c5d0e87b5305ab30591509ffc64300abd4.zip
gcc-ca98e4c5d0e87b5305ab30591509ffc64300abd4.tar.gz
gcc-ca98e4c5d0e87b5305ab30591509ffc64300abd4.tar.bz2
re PR rtl-optimization/85455 (ICE in verify_loop_structure, at cfgloop.c:1708 (error: basic block 3 should be marked irreducible))
2018-04-19 Richard Biener <rguenther@suse.de> PR middle-end/85455 * cfg.c (clear_bb_flags): When loop state says we have marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP. * gcc.dg/pr85455.c: New testcase. From-SVN: r259494
Diffstat (limited to 'gcc/cfg.c')
-rw-r--r--gcc/cfg.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cfg.c b/gcc/cfg.c
index 808d587..11026e7 100644
--- a/gcc/cfg.c
+++ b/gcc/cfg.c
@@ -386,9 +386,13 @@ void
clear_bb_flags (void)
{
basic_block bb;
+ int flags_to_preserve = BB_FLAGS_TO_PRESERVE;
+ if (current_loops
+ && loops_state_satisfies_p (cfun, LOOPS_HAVE_MARKED_IRREDUCIBLE_REGIONS))
+ flags_to_preserve |= BB_IRREDUCIBLE_LOOP;
FOR_ALL_BB_FN (bb, cfun)
- bb->flags &= BB_FLAGS_TO_PRESERVE;
+ bb->flags &= flags_to_preserve;
}
/* Check the consistency of profile information. We can't do that