> Hi, > > 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. > > Fixed by making cgraph_node::can_be_local_p return false for ifunc > resolvers, as it should. The patch also adds dumping of the symtab_node > flag. Bootstrapped and tested on x86_64-linux, OK for trunk? > > Thanks, > > Martin > > > > 2019-11-27 Martin Jambor <mjam...@suse.cz> > > PR ipa/92697 > * cgraph.c (cgraph_node_cannot_be_local_p_1): Return true for > ifunc_resolvers. > * symtab.c (symtab_node::dump_base): Dump ifunc_resolver flag. > Removed trailig whitespace. > > testsuite/ > * g++.dg/ipa/pr92697.C: New. OK, thanks!
Honza