aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-if-conv.c
diff options
context:
space:
mode:
authorYuri Rumyantsev <ysrumyan@gmail.com>2014-06-05 10:24:22 +0000
committerKirill Yukhin <kyukhin@gcc.gnu.org>2014-06-05 10:24:22 +0000
commite12355efb750245dbf58be8b054f2ab360d53f9e (patch)
treed67f6880cc1ad781381c7f8dd4b6d1fd079b34cc /gcc/tree-if-conv.c
parent947ca6a0c89e475c5ca53cd2a6c291dafab3d5bc (diff)
downloadgcc-e12355efb750245dbf58be8b054f2ab360d53f9e.zip
gcc-e12355efb750245dbf58be8b054f2ab360d53f9e.tar.gz
gcc-e12355efb750245dbf58be8b054f2ab360d53f9e.tar.bz2
re PR other/61391 (ICE in execute_one_pass at -O3 and above)
2014-06-05 Yuri Rumyantsev <ysrumyan@gmail.com> gcc/ PR tree-optimization/61391 * tree-if-conv.c (is_cond_scalar_reduction): Add missed check that stmt belongs to loop. gcc/testsuite/ * gcc.dg/torture/pr61391.c: New test. From-SVN: r211263
Diffstat (limited to 'gcc/tree-if-conv.c')
-rw-r--r--gcc/tree-if-conv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c
index 69f1e1f..6e298d3 100644
--- a/gcc/tree-if-conv.c
+++ b/gcc/tree-if-conv.c
@@ -1439,6 +1439,9 @@ is_cond_scalar_reduction (gimple phi, gimple *reduc,
|| gimple_has_volatile_ops (stmt))
return false;
+ if (!flow_bb_inside_loop_p (loop, gimple_bb (stmt)))
+ return false;
+
if (!is_predicated (gimple_bb (stmt)))
return false;