aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-ccp.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2017-05-26 07:19:00 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2017-05-26 07:19:00 +0000
commit28e0e05badfbdf7930bbd6f3051b07dd7ec37ae2 (patch)
treee08d74d56d5b4c52e9ca57d243a837d4a7894b2b /gcc/tree-ssa-ccp.c
parentf408a6350f28490124ae042207027fa6599af29b (diff)
downloadgcc-28e0e05badfbdf7930bbd6f3051b07dd7ec37ae2.zip
gcc-28e0e05badfbdf7930bbd6f3051b07dd7ec37ae2.tar.gz
gcc-28e0e05badfbdf7930bbd6f3051b07dd7ec37ae2.tar.bz2
re PR tree-optimization/80842 (ICE at -O3 on x86_64-linux-gnu in "set_lattice_value")
2017-05-26 Richard Biener <rguenther@suse.de> PR tree-optimization/80842 * tree-ssa-ccp.c (set_lattice_value): Always meet with the old value. * gcc.dg/torture/pr80842.c: New testcase. From-SVN: r248482
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r--gcc/tree-ssa-ccp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index b54062c..f18f2e0 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -497,9 +497,7 @@ set_lattice_value (tree var, ccp_prop_value_t *new_val)
use the meet operator to retain a conservative value.
Missed optimizations like PR65851 makes this necessary.
It also ensures we converge to a stable lattice solution. */
- if (new_val->lattice_val == CONSTANT
- && old_val->lattice_val == CONSTANT
- && TREE_CODE (new_val->value) != SSA_NAME)
+ if (old_val->lattice_val != UNINITIALIZED)
ccp_lattice_meet (new_val, old_val);
gcc_checking_assert (valid_lattice_transition (*old_val, *new_val));