diff options
author | Richard Biener <rguenther@suse.de> | 2014-05-19 14:32:23 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2014-05-19 14:32:23 +0000 |
commit | 051351362bfe8552549443b77bdbd0ac5e003eac (patch) | |
tree | af10f92a91fffb8d09a0fb417dee649957a83b4b /gcc/tree-ssa-sccvn.c | |
parent | 40ba8dfb395e8ed85990a2655cf0d8a0f7619e0c (diff) | |
download | gcc-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.c | 6 |
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) |