Commit 59b5b466 by Jan Hubicka Committed by Jan Hubicka

re PR middle-end/61558 (ICE: Segmentation fault)


	PR ipa/61558
	* symtab.c (symbol_table::insert_to_assembler_name_hash
	symbol_table::unlink_from_assembler_name_hash): Do not ICE when	
	DECL_ASSEMBLER_NAME is NULL.

From-SVN: r218729
parent 38c1b72f
2014-12-14 Jan Hubicka <hubicka@ucw.cz> 2014-12-14 Jan Hubicka <hubicka@ucw.cz>
PR ipa/61558
* symtab.c (symbol_table::insert_to_assembler_name_hash
symbol_table::unlink_from_assembler_name_hash): Do not ICE when
DECL_ASSEMBLER_NAME is NULL.
2014-12-14 Jan Hubicka <hubicka@ucw.cz>
* cgraphunit.c (analyze_functions): Always analyze targets of aliases. * cgraphunit.c (analyze_functions): Always analyze targets of aliases.
2014-12-14 Jan Hubicka <hubicka@ucw.cz> 2014-12-14 Jan Hubicka <hubicka@ucw.cz>
...@@ -168,6 +168,11 @@ symbol_table::insert_to_assembler_name_hash (symtab_node *node, ...@@ -168,6 +168,11 @@ symbol_table::insert_to_assembler_name_hash (symtab_node *node,
tree name = DECL_ASSEMBLER_NAME (node->decl); tree name = DECL_ASSEMBLER_NAME (node->decl);
/* C++ FE can produce decls without associated assembler name and insert
them to symtab to hold section or TLS information. */
if (!name)
return;
hashval_t hash = decl_assembler_name_hash (name); hashval_t hash = decl_assembler_name_hash (name);
aslot = assembler_name_hash->find_slot_with_hash (name, hash, INSERT); aslot = assembler_name_hash->find_slot_with_hash (name, hash, INSERT);
gcc_assert (*aslot != node); gcc_assert (*aslot != node);
...@@ -209,6 +214,10 @@ symbol_table::unlink_from_assembler_name_hash (symtab_node *node, ...@@ -209,6 +214,10 @@ symbol_table::unlink_from_assembler_name_hash (symtab_node *node,
{ {
tree name = DECL_ASSEMBLER_NAME (node->decl); tree name = DECL_ASSEMBLER_NAME (node->decl);
symtab_node **slot; symtab_node **slot;
if (!name)
return;
hashval_t hash = decl_assembler_name_hash (name); hashval_t hash = decl_assembler_name_hash (name);
slot = assembler_name_hash->find_slot_with_hash (name, hash, slot = assembler_name_hash->find_slot_with_hash (name, hash,
NO_INSERT); NO_INSERT);
......
2014-12-14 Jan HUbicka <hubicka@ucw.cz> 2014-12-14 Jan Hubicka <hubicka@ucw.cz>
PR ipa/61558
* g++.dg/torture/pr61558.C: New testcase.
2014-12-14 Jan Hubicka <hubicka@ucw.cz>
PR lto/64043 PR lto/64043
* g++.dg/lto/pr64043_0.C: New testcase. * g++.dg/lto/pr64043_0.C: New testcase.
......
// { dg-do compile }
static __typeof 0 a __attribute__ ((__weakref__ ("")));
template <typename> class A
{
static __thread int b;
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment