[Bug ipa/91956] [10 Regression] ICE: verify_cgraph_node failed (error: comdat-local function called by __ct .isra outside its comdat) since r275982
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91956 --- Comment #5 from CVS Commits --- The master branch has been updated by Martin Jambor : https://gcc.gnu.org/g:b90061c6ec090c6b41a44987c646c828e5165298 commit r10-7523-gb90061c6ec090c6b41a44987c646c828e5165298 Author: Martin Jambor Date: Thu Apr 2 17:52:38 2020 +0200 Prevent IPA-SRA from creating calls to local comdats (PR 92676) since r278669 (fix for PR ipa/91956), IPA-SRA makes sure that the clone it creates is put into the same same_comdat as the original cgraph_node, so that it can call private comdats (such as the ipa-split bits of a comdat that is private). However, that means that if there is non-comdat caller of a public comdat that is modified by IPA-SRA, it now finds itself calling a private comdat, which call graph verifier does not like (and for a reason, in theory it can disappear and since it is private it would not be available from other CUs). The patch fixes this by performing the fix for PR 91956 only when the node in question actually calls a local comdat and when it does, also making sure that no callers come from a different same_comdat (disabling IPA-SRA if both conditions are true), so that it plays by the rules in both modes, does not violate the private comdat calling rule and at the same time does not disable the transformation unnecessarily. The patch also fixes up the calls_comdat_local of callers of the modified node, despite that not triggering any known issues. 2020-04-02 Martin Jambor PR ipa/92676 * ipa-sra.c (struct caller_issues): New fields candidate and call_from_outside_comdat. (check_for_caller_issues): Check for calls from outsied of candidate's same_comdat_group. (check_all_callers_for_issues): Set up issues.candidate, check result of the new check. (mark_callers_calls_comdat_local): New function. (process_isra_node_results): Set calls_comdat_local of callers if appropriate.
[Bug ipa/91956] [10 Regression] ICE: verify_cgraph_node failed (error: comdat-local function called by __ct .isra outside its comdat) since r275982
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91956 Martin Jambor changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #4 from Martin Jambor --- Fixed.
[Bug ipa/91956] [10 Regression] ICE: verify_cgraph_node failed (error: comdat-local function called by __ct .isra outside its comdat) since r275982
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91956 --- Comment #3 from Martin Jambor --- Author: jamborm Date: Mon Nov 25 10:09:42 2019 New Revision: 278669 URL: https://gcc.gnu.org/viewcvs?rev=278669&root=gcc&view=rev Log: Make IPA-SRA follow comdat-local rules (PR 91956) 2019-11-25 Martin Jambor 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. Added: trunk/gcc/testsuite/g++.dg/ipa/pr91956.C Modified: trunk/gcc/ChangeLog trunk/gcc/ipa-sra.c trunk/gcc/testsuite/ChangeLog
[Bug ipa/91956] [10 Regression] ICE: verify_cgraph_node failed (error: comdat-local function called by __ct .isra outside its comdat) since r275982
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91956 --- Comment #2 from Martin Jambor --- I proposed a patch on the mailing list: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02203.html
[Bug ipa/91956] [10 Regression] ICE: verify_cgraph_node failed (error: comdat-local function called by __ct .isra outside its comdat) since r275982
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91956 Martin Liška changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2019-10-22 Known to work||9.2.0 Assignee|unassigned at gcc dot gnu.org |jamborm at gcc dot gnu.org Summary|[10 Regression] ICE:|[10 Regression] ICE: |verify_cgraph_node failed |verify_cgraph_node failed |(error: comdat-local|(error: comdat-local |function called by __ct |function called by __ct |.isra outside its comdat) |.isra outside its comdat) ||since r275982 Ever confirmed|0 |1 Known to fail||10.0 --- Comment #1 from Martin Liška --- Martin, you will need probably to do something similar to what IPA ICF does: https://github.com/gcc-mirror/gcc/blob/master/gcc/ipa-icf.c#L1060 in order to prevent the verifier error. Can you please take a look?