From 77abb5d87daf09198eca038162e3989dadacbae8 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Sat, 10 Aug 2002 20:00:54 +0200 Subject: [PATCH] cfg.c (redirect_edge_succ_nodup): Avoid overflows due to roundoff errors. * cfg.c (redirect_edge_succ_nodup): Avoid overflows due to roundoff errors. From-SVN: r56184 --- gcc/ChangeLog | 6 ++++++ gcc/cfg.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 02b40fc4de7..d62b26d2821 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Sat Aug 10 19:59:43 CEST 2002 Jan Hubicka + Graham Stott + + * cfg.c (redirect_edge_succ_nodup): Avoid overflows due to roundoff + errors. + 2002-08-10 Kaveh R. Ghazi * emit-rtl.c (emit_jump_insn_before, emit_call_insn_before, diff --git a/gcc/cfg.c b/gcc/cfg.c index 33599d354e0..c6ffdc22de3 100644 --- a/gcc/cfg.c +++ b/gcc/cfg.c @@ -455,6 +455,8 @@ redirect_edge_succ_nodup (e, new_succ) { s->flags |= e->flags; s->probability += e->probability; + if (s->probability > REG_BR_PROB_BASE) + s->probability = REG_BR_PROB_BASE; s->count += e->count; remove_edge (e); e = s;