re PR c++/60553 (segfault in gt_ggc_mx_lang_tree_node in Chromium with LTO)

2014-03-19  Richard Biener  <rguenther@suse.de>

	PR middle-end/60553
	* tree-core.h (tree_type_common): Re-order pointer members
	to reduce recursion depth during GC walks.

	lto/
	* lto-tree.h (lang_tree_node): For types use TYPE_NEXT_VARIANT 
	instead of TREE_CHAIN as chain_next.

From-SVN: r208682
This commit is contained in:
Richard Biener 2014-03-19 15:37:28 +00:00 committed by Richard Biener
parent 6daa2d914b
commit ce2f49b3bf
4 changed files with 15 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2014-03-19 Richard Biener <rguenther@suse.de>
PR middle-end/60553
* tree-core.h (tree_type_common): Re-order pointer members
to reduce recursion depth during GC walks.
2014-03-19 Marek Polacek <polacek@redhat.com>
PR sanitizer/60569

View File

@ -1,3 +1,9 @@
2014-03-19 Richard Biener <rguenther@suse.de>
PR middle-end/60553
* lto-tree.h (lang_tree_node): For types use TYPE_NEXT_VARIANT
instead of TREE_CHAIN as chain_next.
2014-03-19 Richard Biener <rguenther@suse.de>
* lto.c (lto_wpa_write_files): Move call to

View File

@ -48,7 +48,7 @@ enum lto_tree_node_structure_enum {
};
union GTY((desc ("lto_tree_node_structure (&%h)"),
chain_next ("CODE_CONTAINS_STRUCT (TREE_CODE (&%h.generic), TS_COMMON) ? ((union lang_tree_node *) TREE_CHAIN (&%h.generic)) : NULL")))
chain_next ("CODE_CONTAINS_STRUCT (TREE_CODE (&%h.generic), TS_TYPE_COMMON) ? ((union lang_tree_node *) %h.generic.type_common.next_variant) : CODE_CONTAINS_STRUCT (TREE_CODE (&%h.generic), TS_COMMON) ? ((union lang_tree_node *) %h.generic.common.chain) : NULL")))
lang_tree_node
{
union tree_node GTY ((tag ("TS_LTO_GENERIC"),

View File

@ -1265,11 +1265,11 @@ struct GTY(()) tree_type_common {
const char * GTY ((tag ("TYPE_SYMTAB_IS_POINTER"))) pointer;
struct die_struct * GTY ((tag ("TYPE_SYMTAB_IS_DIE"))) die;
} GTY ((desc ("debug_hooks->tree_type_symtab_field"))) symtab;
tree name;
tree canonical;
tree next_variant;
tree main_variant;
tree context;
tree canonical;
tree name;
};
struct GTY(()) tree_type_with_lang_specific {