aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/tree-ssa-live.c12
2 files changed, 18 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index db91515..a3e2696 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2005-06-30 Zdenek Dvorak <dvorakz@suse.cz>
+
+ PR testsuite/21967
+ * tree-ssa-live.c (mark_all_vars_used_1): Ignore variables in
+ TMR_ORIGINAL.
+
2005-06-30 Bernd Schmidt <bernd.schmidt@analog.com>
* config/bfin/bfin.md (addv2hi3, subv2hi3, sminv2hi3, smaxv2hi3,
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)