OSDN Git Service

* cfg.c (redirect_edge_succ_nodup): Avoid overflows due to roundoff
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 10 Aug 2002 18:00:54 +0000 (18:00 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 10 Aug 2002 18:00:54 +0000 (18:00 +0000)
errors.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56184 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/cfg.c

index 02b40fc..d62b26d 100644 (file)
@@ -1,3 +1,9 @@
+Sat Aug 10 19:59:43 CEST 2002  Jan Hubicka  <jh@suse.cz>
+                              Graham Stott
+
+       * cfg.c (redirect_edge_succ_nodup): Avoid overflows due to roundoff
+       errors.
+
 2002-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * emit-rtl.c (emit_jump_insn_before, emit_call_insn_before,
index 33599d3..c6ffdc2 100644 (file)
--- 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;