https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92685
Bug ID: 92685 Summary: In IPA's execute stage create_version_clone_with_body fails with non-vNULL callers Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: erick.oc...@theobroma-systems.com CC: marxin at gcc dot gnu.org Target Milestone: --- Created attachment 47367 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47367&action=edit Hello World IPA pass with call to create_version_clone_with_body Hello, I am developing a simple ipa pass that versions a single call site to method `bar`. I am using `create_version_clone_with_body` instead of `create_version_clone` because I want to modify `foo`'s body. In my test case I have three functions * main * foo * bar In my simple ipa pass, I have implemented the execute stage to call `create_version_clone_with_body` for method bar. I am compiling my test with -flto-partition=none, which if I understand correctly means the execution stage should have access to the method bodies. You can apply the patch to master (commit id: 17a2c588c29f089d3c2a36df47175bbdf376e399) I also add my test case. After compiling with my patch, to trigger the bug just modify the Makefile to point to the version of gcc with the patch and `make`.