[Bug tree-optimization/86038] [9 Regression] ICE in to_reg_br_prob_base, at profile-count.h:242
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jun 4 07:17:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86038
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
So instead of dropping the initialized_p () check in the original below we
should probably return NULL as well if !initialized_p ().
if (best->probability.initialized_p ()
&& best->probability.to_reg_br_prob_base () <= probability_cutoff)
return NULL;
Testing
Index: gcc/tracer.c
===================================================================
--- gcc/tracer.c (revision 261136)
+++ gcc/tracer.c (working copy)
@@ -159,7 +159,8 @@ find_best_successor (basic_block bb)
}
if (!best || ignore_bb_p (best->dest))
return NULL;
- if (best->probability.to_reg_br_prob_base () <= probability_cutoff)
+ if (!best->probability.initialized_p ()
+ || best->probability.to_reg_br_prob_base () <= probability_cutoff)
return NULL;
return best;
}
More information about the Gcc-bugs
mailing list