From: Jakub Jelinek Date: Fri, 24 Jun 2011 21:11:16 +0000 (+0200) Subject: re PR c++/46400 (g++ Segmentation Fault on heavily templated project.) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f796c438809c7afa4788f399d84dbf34a1827cdc;p=gcc.git re PR c++/46400 (g++ Segmentation Fault on heavily templated project.) PR c++/46400 * cp-tree.h (union lang_tree_node): Use TYPE_NEXT_VARIANT instead of TYPE_CHAIN for chain_next for types. * c-decl.c (union lang_tree_node): Use TYPE_NEXT_VARIANT instead of TYPE_CHAIN for chain_next for types. From-SVN: r175389 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2c9995a8e66..54b8fdba271 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-06-24 Jakub Jelinek + + PR c++/46400 + * c-decl.c (union lang_tree_node): Use TYPE_NEXT_VARIANT + instead of TYPE_CHAIN for chain_next for types. + 2011-06-24 Richard Henderson * config/sparc/sparc.md (create_flat_frame_1): Remove. diff --git a/gcc/c-decl.c b/gcc/c-decl.c index e42a3c54b4e..1c7552b7589 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -238,7 +238,7 @@ extern char C_SIZEOF_STRUCT_LANG_IDENTIFIER_isnt_accurate /* The resulting tree type. */ union GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"), - chain_next ("TREE_CODE (&%h.generic) == INTEGER_TYPE ? (union lang_tree_node *) TYPE_NEXT_VARIANT (&%h.generic) : CODE_CONTAINS_STRUCT (TREE_CODE (&%h.generic), TS_COMMON) ? ((union lang_tree_node *) TREE_CHAIN (&%h.generic)) : NULL"))) lang_tree_node + chain_next ("CODE_CONTAINS_STRUCT (TREE_CODE (&%h.generic), TS_TYPE_COMMON) ? (union lang_tree_node *) TYPE_NEXT_VARIANT (&%h.generic) : CODE_CONTAINS_STRUCT (TREE_CODE (&%h.generic), TS_COMMON) ? ((union lang_tree_node *) TREE_CHAIN (&%h.generic)) : NULL"))) lang_tree_node { union tree_node GTY ((tag ("0"), desc ("tree_node_structure (&%h)"))) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e860837f4e8..ae1a64958b8 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2011-06-24 Jakub Jelinek + + PR c++/46400 + * cp-tree.h (union lang_tree_node): Use TYPE_NEXT_VARIANT + instead of TYPE_CHAIN for chain_next for types. + 2011-06-23 Gabriel Charette * name-lookup.h (cp_binding_level): Removed unused diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 904e44c77b1..872ff6ffe89 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -729,7 +729,7 @@ enum cp_tree_node_structure_enum { /* The resulting tree type. */ union GTY((desc ("cp_tree_node_structure (&%h)"), - chain_next ("CODE_CONTAINS_STRUCT (TREE_CODE (&%h.generic), TS_COMMON) ? ((union lang_tree_node *) TREE_CHAIN (&%h.generic)) : NULL"))) lang_tree_node { + chain_next ("CODE_CONTAINS_STRUCT (TREE_CODE (&%h.generic), TS_TYPE_COMMON) ? ((union lang_tree_node *) TYPE_NEXT_VARIANT (&%h.generic)) : CODE_CONTAINS_STRUCT (TREE_CODE (&%h.generic), TS_COMMON) ? ((union lang_tree_node *) TREE_CHAIN (&%h.generic)) : NULL"))) lang_tree_node { union tree_node GTY ((tag ("TS_CP_GENERIC"), desc ("tree_node_structure (&%h)"))) generic; struct template_parm_index_s GTY ((tag ("TS_CP_TPI"))) tpi;