aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssanames.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2019-03-18 13:59:11 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2019-03-18 13:59:11 +0000
commitca6d4a08c120841654acb10b973b0d009b053ef3 (patch)
treead85bf9aa281b6f0ae99a6d52b1feae8ec504aa6 /gcc/tree-ssanames.c
parentf9cacebbde8427e0537e79fe87dd1c89251a2582 (diff)
downloadgcc-ca6d4a08c120841654acb10b973b0d009b053ef3.zip
gcc-ca6d4a08c120841654acb10b973b0d009b053ef3.tar.gz
gcc-ca6d4a08c120841654acb10b973b0d009b053ef3.tar.bz2
re PR tree-optimization/88945 (ICE in fold_convert_loc in FRE when using -fdump-tree-fre-details)
2019-03-18 Richard Biener <rguenther@suse.de> PR middle-end/88945 * tree-ssanames.c (release_ssa_name_fn): For released SSA names use a TREE_TYPE of error_mark_node to avoid ICEs when dumping basic-blocks that are removed. Remove restoring SSA_NAME_VAR. * tree-outof-ssa.c (eliminate_useless_phis): Remove redundant checking. From-SVN: r269765
Diffstat (limited to 'gcc/tree-ssanames.c')
-rw-r--r--gcc/tree-ssanames.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c
index c457334..5bac799 100644
--- a/gcc/tree-ssanames.c
+++ b/gcc/tree-ssanames.c
@@ -595,7 +595,6 @@ release_ssa_name_fn (struct function *fn, tree var)
defining statement. */
if (! SSA_NAME_IN_FREE_LIST (var))
{
- tree saved_ssa_name_var = SSA_NAME_VAR (var);
int saved_ssa_name_version = SSA_NAME_VERSION (var);
use_operand_p imm = &(SSA_NAME_IMM_USE_NODE (var));
@@ -621,13 +620,14 @@ release_ssa_name_fn (struct function *fn, tree var)
/* Restore the version number. */
SSA_NAME_VERSION (var) = saved_ssa_name_version;
- /* Hopefully this can go away once we have the new incremental
- SSA updating code installed. */
- SET_SSA_NAME_VAR_OR_IDENTIFIER (var, saved_ssa_name_var);
-
/* Note this SSA_NAME is now in the first list. */
SSA_NAME_IN_FREE_LIST (var) = 1;
+ /* Put in a non-NULL TREE_TYPE so dumping code will not ICE
+ if it happens to come along a released SSA name and tries
+ to inspect its type. */
+ TREE_TYPE (var) = error_mark_node;
+
/* And finally queue it so that it will be put on the free list. */
vec_safe_push (FREE_SSANAMES_QUEUE (fn), var);
}