https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114254
Bug ID: 114254 Summary: Indirect inlining through C++ member pointers fails if the underlying class has a virtual function Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ipa Assignee: jamborm at gcc dot gnu.org Reporter: jamborm at gcc dot gnu.org Target Milestone: --- Created attachment 57634 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57634&action=edit testcase Just adding a virtual method to the class in our test testsuite/g++.dg/ipa/iinline-2.C and it will unfortunately stop working. At some point the C++ FE got clever and stopped emitting the complex code checking if a member pointer points to a virtual method or a normal one when the base class does not have any virtual method. But that meant that our testcases stopped exercising the pattern matching code in ipa_analyze_indirect_call_uses and when that code changed with r10-917-g3b47da42de621c (Martin Jambor: Make SRA re-construct original memory accesses when easy) because of a small mistake, we lost the intended ability to inline also these cases. So this is a regression against 9.5, unfortunately.