From 89632019a9e0a159df1bd6fcd76680257e846bd6 Mon Sep 17 00:00:00 2001 From: Zdenek Dvorak Date: Thu, 30 Jun 2005 13:06:32 +0200 Subject: re PR testsuite/21967 (gcc.dg/tree-ssa/loop-2.c and gcc.dg/tree-ssa/loop-4.c fail) PR testsuite/21967 * tree-ssa-live.c (mark_all_vars_used_1): Ignore variables in TMR_ORIGINAL. From-SVN: r101462 --- gcc/tree-ssa-live.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gcc/tree-ssa-live.c') diff --git a/gcc/tree-ssa-live.c b/gcc/tree-ssa-live.c index cbd36f1..180916d 100644 --- a/gcc/tree-ssa-live.c +++ b/gcc/tree-ssa-live.c @@ -286,6 +286,7 @@ change_partition_var (var_map map, tree var, int part) map->partition_to_var[map->compact_to_partition[part]] = var; } +static inline void mark_all_vars_used (tree *); /* Helper function for mark_all_vars_used, called via walk_tree. */ @@ -295,6 +296,17 @@ mark_all_vars_used_1 (tree *tp, int *walk_subtrees, { tree t = *tp; + /* Ignore TREE_ORIGINAL for TARGET_MEM_REFS, as well as other + fields that do not contain vars. */ + if (TREE_CODE (t) == TARGET_MEM_REF) + { + mark_all_vars_used (&TMR_SYMBOL (t)); + mark_all_vars_used (&TMR_BASE (t)); + mark_all_vars_used (&TMR_INDEX (t)); + *walk_subtrees = 0; + return NULL; + } + /* Only need to mark VAR_DECLS; parameters and return results are not eliminated as unused. */ if (TREE_CODE (t) == VAR_DECL) -- cgit v1.1