https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92697
Bug ID: 92697 Summary: IPA-SRA modifies ifunc_resolvers Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ipa Assignee: jamborm at gcc dot gnu.org Reporter: jamborm at gcc dot gnu.org CC: marxin at gcc dot gnu.org Target Milestone: --- Created attachment 47381 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47381&action=edit testcase In the attached testcase, IPA-SRA thinks that an ifunc resolver (meanwhile IPA-split into two functions) function can be changed and so goes ahead. The cgraph machinery then however throws away the new clone of the caller instead of the "old" caller and inliner inlines the clone of the ".part" function into the original resolver, which results into an interesting miscompilation because IPA-SRA counted on that both the caller and the callee are modified. In any event, changing the signature of an ifunc resolver must not be done.