From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 061283858423; Wed, 28 Jun 2023 04:42:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 061283858423 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687927348; bh=iWRBJ34lVCXHpPJxHD90aXT1wuvUxs4EyPH3DveOXXw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=UJfo3OP63OPxFGjYzoYBnQ1WWaB5hyyfoa2GBk273q1XWebcT68pWqqy4NENRzI6Q kXZPfCOe/qL8AFRJB3OdtaM7r+TCfRHaUkryAiSSaAe/3bGnzWYK/nTkc1IwPMf7pl Ugxm7JZR1Oao82gte1cCHer9i5upO6t1kAAl8+4E= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/110334] [13/14 Regresssion] unused functions not eliminated before LTO streaming Date: Wed, 28 Jun 2023 04:42:24 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 13.1.1 X-Bugzilla-Keywords: lto, missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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=3D110334 --- Comment #13 from CVS Commits --- The trunk branch has been updated by Jason Merrill : https://gcc.gnu.org/g:abdf0b6cdff5783b97f35ad61ae31433f0569dfd commit r14-2149-gabdf0b6cdff5783b97f35ad61ae31433f0569dfd Author: Jason Merrill Date: Tue Jun 27 05:15:01 2023 -0400 c++: inherited constructor attributes Inherited constructors are like constructor clones; they don't exist fr= om the language perspective, so they should copy the attributes in the same way. But it doesn't make sense to copy alias or ifunc attributes in ei= ther case. Unlike handle_copy_attribute, we do want to copy inlining attributes. The discussion of PR110334 pointed out that we weren't copying the always_inline attribute, leading to poor inlining choices. PR c++/110334 gcc/cp/ChangeLog: * cp-tree.h (clone_attrs): Declare. * method.cc (implicitly_declare_fn): Use it for inherited constructor. * optimize.cc (clone_attrs): New. (maybe_clone_body): Use it. gcc/testsuite/ChangeLog: * g++.dg/cpp1z/nodiscard-inh1.C: New test.=