From d9f8303fb6886eb46fa66c4a7595dc8219a52160 Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Wed, 25 May 2011 12:52:10 +0000 Subject: move TS_EXP to be a substructure of TS_TYPED move TS_EXP to be a substructure of TS_TYPED gcc/ * tree.h (struct tree_exp): Inherit from struct tree_typed. * tree.c (initialize_tree_contains_struct): Mark TS_EXP as TS_TYPED instead of TS_COMMON. gcc/lto/ * lto.c (lto_ft_typed): New function. (lto_ft_common): Call it. (lto_ft_constructor): Likewise. (lto_ft_expr): Likewise. (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing TREE_CHAIN. From-SVN: r174192 --- gcc/lto/ChangeLog | 9 +++++++++ gcc/lto/lto.c | 19 +++++++++++++------ 2 files changed, 22 insertions(+), 6 deletions(-) (limited to 'gcc/lto') diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 893997a..aa8859c 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,12 @@ +2011-05-25 Nathan Froyd + + * lto.c (lto_ft_typed): New function. + (lto_ft_common): Call it. + (lto_ft_constructor): Likewise. + (lto_ft_expr): Likewise. + (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing + TREE_CHAIN. + 2011-05-20 Richard Guenther * lto.c (lto_ft_common): Remove pointer-to chain teardown. diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index d64ba18..1067b51 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -254,14 +254,20 @@ remember_with_vars (tree t) static void lto_fixup_types (tree); -/* Fix up fields of a tree_common T. */ +/* Fix up fields of a tree_typed T. */ static void -lto_ft_common (tree t) +lto_ft_typed (tree t) { - /* Fixup our type. */ LTO_FIXUP_TREE (TREE_TYPE (t)); +} + +/* Fix up fields of a tree_common T. */ +static void +lto_ft_common (tree t) +{ + lto_ft_typed (t); LTO_FIXUP_TREE (TREE_CHAIN (t)); } @@ -398,7 +404,7 @@ lto_ft_constructor (tree t) unsigned HOST_WIDE_INT idx; constructor_elt *ce; - LTO_FIXUP_TREE (TREE_TYPE (t)); + lto_ft_typed (t); for (idx = 0; VEC_iterate(constructor_elt, CONSTRUCTOR_ELTS (t), idx, ce); @@ -415,7 +421,7 @@ static void lto_ft_expr (tree t) { int i; - lto_ft_common (t); + lto_ft_typed (t); for (i = TREE_OPERAND_LENGTH (t) - 1; i >= 0; --i) LTO_FIXUP_TREE (TREE_OPERAND (t, i)); } @@ -2029,7 +2035,8 @@ lto_fixup_prevailing_decls (tree t) { enum tree_code code = TREE_CODE (t); LTO_NO_PREVAIL (TREE_TYPE (t)); - LTO_NO_PREVAIL (TREE_CHAIN (t)); + if (CODE_CONTAINS_STRUCT (code, TS_COMMON)) + LTO_NO_PREVAIL (TREE_CHAIN (t)); if (DECL_P (t)) { LTO_NO_PREVAIL (DECL_NAME (t)); -- cgit v1.1