diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-02 10:33:46 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-02 10:33:46 +0000 |
commit | 64e1f01dbdf92f40464319c9359d8c330edd2177 (patch) | |
tree | 429456a11bd954fe29706c1e6896e3981d44fd2a /gcc/cgraph.c | |
parent | b133fc4176e7960ad53a02f69b5b129ac0f529f7 (diff) | |
download | gcc-64e1f01dbdf92f40464319c9359d8c330edd2177.tar.gz |
PR tree-optimization/37095
* cgraph.c (cgraph_node): When creating new cgraph node after
assembler_name_hash has been populated, record it in the hash
table.
* g++.dg/inherit/thunk9.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139887 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index fdc156dfe33..54d5fad23ee 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -453,7 +453,21 @@ cgraph_node (tree decl) node->origin->nested = node; node->master_clone = node; } - + if (assembler_name_hash) + { + void **aslot; + tree name = DECL_ASSEMBLER_NAME (decl); + + aslot = htab_find_slot_with_hash (assembler_name_hash, name, + decl_assembler_name_hash (name), + INSERT); + /* We can have multiple declarations with same assembler name. For C++ + it is __builtin_strlen and strlen, for instance. Do we need to + record them all? Original implementation marked just first one + so lets hope for the best. */ + if (*aslot == NULL) + *aslot = node; + } return node; } |