summaryrefslogtreecommitdiff
path: root/gcc/cfg.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2002-08-10 18:00:54 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2002-08-10 18:00:54 +0000
commit4c1171a641f0e5e5cd64360330d5a8ef48eb89f4 (patch)
treec1d707eefa16aa6b48032a0f3ce9f2b018e2b164 /gcc/cfg.c
parent901d116055f915a80091e4e40480a5bab325a67b (diff)
downloadgcc-4c1171a641f0e5e5cd64360330d5a8ef48eb89f4.tar.gz
* cfg.c (redirect_edge_succ_nodup): Avoid overflows due to roundoff
errors. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56184 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfg.c')
-rw-r--r--gcc/cfg.c2
1 files changed, 2 insertions, 0 deletions
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;