aboutsummaryrefslogtreecommitdiff
path: root/gcc/predict.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2012-11-02 20:19:15 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2012-11-02 19:19:15 +0000
commitf481cd492ab60e2e8bdbbf4e5d0b4745b38b236d (patch)
tree0c4c2726c2bba5fd6d40290ce905447cc4decec4 /gcc/predict.c
parent2749bf296976b55509d3c199c913d018d1680f3e (diff)
downloadgcc-f481cd492ab60e2e8bdbbf4e5d0b4745b38b236d.zip
gcc-f481cd492ab60e2e8bdbbf4e5d0b4745b38b236d.tar.gz
gcc-f481cd492ab60e2e8bdbbf4e5d0b4745b38b236d.tar.bz2
* predict.c (predict_loops): Do not predict infinite loops.
From-SVN: r193101
Diffstat (limited to 'gcc/predict.c')
-rw-r--r--gcc/predict.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/predict.c b/gcc/predict.c
index 9fc3e71..d27e043 100644
--- a/gcc/predict.c
+++ b/gcc/predict.c
@@ -1403,6 +1403,11 @@ predict_loops (void)
exits = get_loop_exit_edges (loop);
n_exits = VEC_length (edge, exits);
+ if (!n_exits)
+ {
+ VEC_free (edge, heap, exits);
+ continue;
+ }
FOR_EACH_VEC_ELT (edge, exits, j, ex)
{