aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-sccvn.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2014-05-19 14:32:23 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2014-05-19 14:32:23 +0000
commit051351362bfe8552549443b77bdbd0ac5e003eac (patch)
treeaf10f92a91fffb8d09a0fb417dee649957a83b4b /gcc/tree-ssa-sccvn.c
parent40ba8dfb395e8ed85990a2655cf0d8a0f7619e0c (diff)
downloadgcc-051351362bfe8552549443b77bdbd0ac5e003eac.zip
gcc-051351362bfe8552549443b77bdbd0ac5e003eac.tar.gz
gcc-051351362bfe8552549443b77bdbd0ac5e003eac.tar.bz2
re PR middle-end/61209 (internal compiler error: in fold_convert_loc, at fold-const.c:1950)
2014-05-19 Richard Biener <rguenther@suse.de> PR tree-optimization/61209 * tree-ssa-sccvn.c (visit_phi): Avoid setting expr to VN_TOP. * gfortran.dg/pr61209.f90: New testcase. From-SVN: r210613
Diffstat (limited to 'gcc/tree-ssa-sccvn.c')
-rw-r--r--gcc/tree-ssa-sccvn.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
index 84c0d6e..bd60372 100644
--- a/gcc/tree-ssa-sccvn.c
+++ b/gcc/tree-ssa-sccvn.c
@@ -3125,12 +3125,14 @@ visit_phi (gimple phi)
if (is_gimple_min_invariant (sameval))
{
VN_INFO (PHI_RESULT (phi))->has_constants = true;
- VN_INFO (PHI_RESULT (phi))->expr = sameval;
+ if (sameval != VN_TOP)
+ VN_INFO (PHI_RESULT (phi))->expr = sameval;
}
else
{
VN_INFO (PHI_RESULT (phi))->has_constants = false;
- VN_INFO (PHI_RESULT (phi))->expr = sameval;
+ if (sameval != VN_TOP)
+ VN_INFO (PHI_RESULT (phi))->expr = sameval;
}
if (TREE_CODE (sameval) == SSA_NAME)