summaryrefslogtreecommitdiff
path: root/contrib/gcc/tree-inline.c
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2002-12-04 15:42:16 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2002-12-04 15:42:16 +0000
commit908ab21d038874e3e6681d006c505b662d58764d (patch)
treeb43283da12da723664faf65bfc4e4b1f8af5a2cb /contrib/gcc/tree-inline.c
parent2ea5c3f5409e1da5bd287b134cc9077a20627413 (diff)
parent45fc31f8dde65cd5b7930b1047a99745f440e9f3 (diff)
Notes
Diffstat (limited to 'contrib/gcc/tree-inline.c')
-rw-r--r--contrib/gcc/tree-inline.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/contrib/gcc/tree-inline.c b/contrib/gcc/tree-inline.c
index 79f4c52f0b40..307c35c2bb1b 100644
--- a/contrib/gcc/tree-inline.c
+++ b/contrib/gcc/tree-inline.c
@@ -1224,6 +1224,12 @@ walk_tree (tp, func, data, htab_)
{
WALK_SUBTREE_TAIL (TREE_TYPE (*tp));
}
+ else if (TREE_CODE_CLASS (code) == 't')
+ {
+ WALK_SUBTREE (TYPE_SIZE (*tp));
+ WALK_SUBTREE (TYPE_SIZE_UNIT (*tp));
+ /* Also examine various special fields, below. */
+ }
result = (*lang_hooks.tree_inlining.walk_subtrees) (tp, &walk_subtrees, func,
data, htab);
@@ -1320,6 +1326,7 @@ walk_tree (tp, func, data, htab_)
return NULL_TREE;
#undef WALK_SUBTREE
+#undef WALK_SUBTREE_TAIL
}
/* Like walk_tree, but does not walk duplicate nodes more than
@@ -1378,8 +1385,8 @@ copy_tree_r (tp, walk_subtrees, data)
if (TREE_CODE (*tp) == SCOPE_STMT)
SCOPE_STMT_BLOCK (*tp) = NULL_TREE;
}
- else if (TREE_CODE_CLASS (code) == 't')
- /* There's no need to copy types, or anything beneath them. */
+ else if (TREE_CODE_CLASS (code) == 't' && !variably_modified_type_p (*tp))
+ /* Types only need to be copied if they are variably modified. */
*walk_subtrees = 0;
return NULL_TREE;