re PR ipa/65432 (Invalid read of size 1: ipa_icf::sem_item_optimizer::merge_classes...
authorMartin Liska <mliska@suse.cz>
Wed, 18 Mar 2015 14:16:59 +0000 (15:16 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Wed, 18 Mar 2015 14:16:59 +0000 (14:16 +0000)
commit1aec2ecce4085a664f489e7a3585d993a9939a1d
tree55ccb9f54b9b5fe403b7d176c43d8c3cb574bce6
parentfaf4220c7236e48607dd8e286f7f555489d3dbef
re PR ipa/65432 (Invalid read of size 1: ipa_icf::sem_item_optimizer::merge_classes(unsigned int) (ipa-icf.c:2958))

Fix PR ipa/65432

PR ipa/65432
* cgraph.c (cgraph_node::get_create): Remove unnecessary
xstrdup_for_dump wrapper.
* ipa-icf.c (sem_item::dump): Use symtab_node::name instead of
sem_item::name.
(sem_function::equals): Wrap symtab_node::name and symtab_node::asm_name
with xstrdup_for_dump.
(sem_variable::equals): Likewise.
(sem_item_optimizer::read_section): Use symtab_node::name instead of
sem_item::name.
(sem_item_optimizer::parse_funcs_and_vars): Likewise.
(sem_item_optimizer::merge_classes): Wrap symtab_node::name and
symtab_node::asm_name with xstrdup_for_dump.
(congruence_class::dump): Use symtab_node::name instead of
sem_item::name.
* ipa-icf.h (symtab_node::name): Remove.
(symtab_node::asm_name): Likewise.

From-SVN: r221491
gcc/ChangeLog
gcc/cgraph.c
gcc/ipa-icf.c
gcc/ipa-icf.h