re PR lto/78211 (-fcompare-debug failure with -flto -fno-use-linker-plugin)
authorJakub Jelinek <jakub@redhat.com>
Mon, 28 Nov 2016 10:00:43 +0000 (11:00 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 28 Nov 2016 10:00:43 +0000 (11:00 +0100)
commitdf8391b4f574aa9b0e3f5be2f4d0481c5a2cc1c1
tree206c771bdd176d217f1421e76db8049998e8c2a7
parent193273638fffd7a53434e11b28f817015aac9cc4
re PR lto/78211 (-fcompare-debug failure with -flto -fno-use-linker-plugin)

PR lto/78211
* ipa-icf.h (sem_item_optimizer): Add m_classes_vec member.
* ipa-icf.c (sem_item_optimizer::sem_item_optimizer): Initialize
it.
(sem_item_optimizer::~sem_item_optimizer): Traverse m_classes_vec
vector instead of traversing m_classes hash table.  Release
m_classes_vec.
(sem_item_optimizer::read_section, sem_item_optimizer::add_class):
Formatting fixes.
(sem_item_optimizer::get_group_by_hash): When inserting a new group,
add it also to m_classes_vec vector.
(sem_item_optimizer::remove_symtab_node,
sem_item_optimizer::build_hash_based_classes,
sem_item_optimizer::parse_nonsingleton_classes): Formatting fixes.
(sem_item_optimizer::subdivide_classes_by_equality,
sem_item_optimizer::subdivide_classes_by_sensitive_refs,
sem_item_optimizer::verify_classes): Traverse m_classes_vec vector
instead of traversing m_classes hash table.  Formatting fixes.
(sem_item_optimizer::traverse_congruence_split,
sem_item_optimizer::do_congruence_step_for_index,
sem_item_optimizer::do_congruence_step): Formatting fixes.
(sem_item_optimizer::process_cong_reduction): Traverse m_classes_vec
vector instead of traversing m_classes hash table.
(sem_item_optimizer::dump_cong_classes): Likewise.  Formatting fixes.
(sem_item_optimizer::merge_classes): Traverse m_classes_vec vector
instead of traversing m_classes hash table.

* g++.dg/ipa/pr78211.C: New test.

From-SVN: r242910
gcc/ChangeLog
gcc/ipa-icf.c
gcc/ipa-icf.h
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ipa/pr78211.C [new file with mode: 0644]