From a2fc3e63a7a37de2a277cd28a1d63c9fe7e3a067 Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Thu, 26 May 2011 13:29:42 +0000 Subject: [PATCH] make TS_IDENTIFIER be a substructure of TS_TYPED make TS_IDENTIFIER be a substructure of TS_TYPED gcc/ * tree.h (struct tree_identifier): Inherit from tree_typed, not tree_common. (HT_IDENT_TO_GCC_IDENT): Adjust for said change. * tree.c (initialize_tree_contains_struct): Mark TS_IDENTIFIER as TS_BASE instead of TS_COMMON. * varasm.c (assemble_name): Remove assert. gcc/c-family/ * c-common.h (struct c_common_identifier): Inherit from tree_typed, not tree_common. From-SVN: r174286 --- gcc/ChangeLog | 9 +++++++++ gcc/c-family/ChangeLog | 5 +++++ gcc/c-family/c-common.h | 2 +- gcc/tree.c | 2 +- gcc/tree.h | 4 ++-- gcc/varasm.c | 1 - 6 files changed, 18 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 44c1d05f7dc..f6a3ba788ce 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2011-05-26 Nathan Froyd + + * tree.h (struct tree_identifier): Inherit from tree_typed, not + tree_common. + (HT_IDENT_TO_GCC_IDENT): Adjust for said change. + * tree.c (initialize_tree_contains_struct): Mark TS_IDENTIFIER as + TS_BASE instead of TS_COMMON. + * varasm.c (assemble_name): Remove assert. + 2011-05-26 Bernd Schmidt * Makefile.in (srcdirify): Change order so that libgcc_objdir is diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 6ecf5094dd7..f9a38af4b3c 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,8 @@ +2011-05-26 Nathan Froyd + + * c-common.h (struct c_common_identifier): Inherit from tree_typed, + not tree_common. + 2011-05-25 Jakub Jelinek * c-common.c (def_fn_type): Remove extra va_end. diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h index 89d4b80bded..65f8ad1cbbb 100644 --- a/gcc/c-family/c-common.h +++ b/gcc/c-family/c-common.h @@ -307,7 +307,7 @@ enum c_tree_index /* Identifier part common to the C front ends. Inherits from tree_identifier, despite appearances. */ struct GTY(()) c_common_identifier { - struct tree_common common; + struct tree_typed common; struct cpp_hashnode node; }; diff --git a/gcc/tree.c b/gcc/tree.c index 1dfad04174a..2738979c77e 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -381,10 +381,10 @@ initialize_tree_contains_struct (void) case TS_SSA_NAME: case TS_CONSTRUCTOR: case TS_EXP: + case TS_IDENTIFIER: MARK_TS_TYPED (code); break; - case TS_IDENTIFIER: case TS_DECL_MINIMAL: case TS_TYPE_COMMON: case TS_LIST: diff --git a/gcc/tree.h b/gcc/tree.h index 142237feb82..ce01fb7d757 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1541,11 +1541,11 @@ struct GTY(()) tree_vector { pointer, and vice versa. */ #define HT_IDENT_TO_GCC_IDENT(NODE) \ - ((tree) ((char *) (NODE) - sizeof (struct tree_common))) + ((tree) ((char *) (NODE) - sizeof (struct tree_typed))) #define GCC_IDENT_TO_HT_IDENT(NODE) (&((struct tree_identifier *) (NODE))->id) struct GTY(()) tree_identifier { - struct tree_common common; + struct tree_typed typed; struct ht_identifier id; }; diff --git a/gcc/varasm.c b/gcc/varasm.c index f46c21b3bde..2d2284b8881 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -2296,7 +2296,6 @@ assemble_name (FILE *file, const char *name) ultimate_transparent_alias_target (&id); if (id != id_orig) name = IDENTIFIER_POINTER (id); - gcc_assert (! TREE_CHAIN (id)); } assemble_name_raw (file, name); -- 2.30.2