diff options
author | Martin Jambor <mjambor@suse.cz> | 2019-11-25 11:09:42 +0100 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2019-11-25 11:09:42 +0100 |
commit | ed649cda944c2ff0b77f0203bf83f106e930c5e8 (patch) | |
tree | d1cb5d2e303d82acf499b8d891ab40e4e3abcef7 /gcc/ipa-sra.c | |
parent | 5b01f1a57cc90bcee58ccf75e6062748e1d66448 (diff) | |
download | gcc-ed649cda944c2ff0b77f0203bf83f106e930c5e8.zip gcc-ed649cda944c2ff0b77f0203bf83f106e930c5e8.tar.gz gcc-ed649cda944c2ff0b77f0203bf83f106e930c5e8.tar.bz2 |
Make IPA-SRA follow comdat-local rules (PR 91956)
2019-11-25 Martin Jambor <mjambor@suse.cz>
PR ipa/91956
* ipa-sra.c (process_isra_node_results): Put the new node to the
same comdat group as the original node.
testsuite/
* g++.dg/ipa/pr91956.C: New test.
From-SVN: r278669
Diffstat (limited to 'gcc/ipa-sra.c')
-rw-r--r-- | gcc/ipa-sra.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/ipa-sra.c b/gcc/ipa-sra.c index 08606ae..c6ed0f4 100644 --- a/gcc/ipa-sra.c +++ b/gcc/ipa-sra.c @@ -3759,6 +3759,9 @@ process_isra_node_results (cgraph_node *node, = node->create_virtual_clone (callers, NULL, new_adjustments, "isra", suffix_counter); suffix_counter++; + if (node->same_comdat_group) + new_node->add_to_same_comdat_group (node); + new_node->calls_comdat_local = node->calls_comdat_local; if (dump_file) fprintf (dump_file, " Created new node %s\n", new_node->dump_name ()); |