From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 10E4F3857C43; Wed, 6 Mar 2024 15:40:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 10E4F3857C43 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709739621; bh=5bagFrT3NQdEP3gKN7F0Xc6kE09JDxbSeV8RYfrekck=; h=From:To:Subject:Date:From; b=CpxTdyxoa+TBg5NhsDWj567+w5XwPtKVzcdshR66K0X0vpp3Hkd//bwOoB30kBFcs FqWuPQ8mTVfYZcbwypNZLx4U4CGKGvSxsRxdo5T1dOrogLFC4WK8akaRqH+zc9qVV5 10//mUOaPxSJnhJfLoAapzV7Xnqaaqm/uD5exY94= From: "jamborm at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/114254] New: Indirect inlining through C++ member pointers fails if the underlying class has a virtual function Date: Wed, 06 Mar 2024 15:40:20 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jamborm at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jamborm at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114254 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=3D57634&action=3Dedit 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.=