From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6659D3849AE6; Fri, 19 Apr 2024 20:42:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6659D3849AE6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713559357; bh=2mNb2QGb60WpZy2GmtsaXnL9QujFDcRIhVBBBskgJiI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=jcxvCm0UoIPxqP72ERF7VoCN9dQ9GvkYB254q8lHn1Qr4V5OhKS9bnDyK5rXOMG84 VXR4jYS7Sg6jJ/pMnQFDqZUiiH3NZpzmNdMRUSxQW86p3gXXqTb8amZb9PqahDpSDv lH27/bsKm+zzKaHOJFu2EBf4OGqo3buxz6TpPwGk= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/114784] [14 Regression] Inlining fails for always_inline inheriting constructor Date: Fri, 19 Apr 2024 20:42:34 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: priority 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=3D114784 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P1 --- Comment #3 from Jakub Jelinek --- In the debugger I see it is the missing DECL_DISREGARD_INLINE_LIMITS flag: (gdb) p $1->function_decl.disregard_inline_limits $3 =3D 0 (gdb) p $1->function_decl.declared_inline_flag $4 =3D 1 (gdb) p lookup_attribute ("always_inline", $1->decl_common.attributes) $5 =3D (tree_node *) 0x7fffea2e5ac8 (gdb) p debug_generic_stmt (decl_assembler_name ($1)) _ZN7VariantCI119VariantConstructorsIS_EEi --- gcc/cp/method.cc.jj 2024-02-15 09:51:34.474065798 +0100 +++ gcc/cp/method.cc 2024-04-19 22:36:06.432859471 +0200 @@ -3309,6 +3309,8 @@ implicitly_declare_fn (special_function_ constexpr_p =3D DECL_DECLARED_CONSTEXPR_P (inherited_ctor); /* Also copy any attributes. */ DECL_ATTRIBUTES (fn) =3D clone_attrs (DECL_ATTRIBUTES (inherited_cto= r)); + DECL_DISREGARD_INLINE_LIMITS (fn) + =3D DECL_DISREGARD_INLINE_LIMITS (inherited_ctor); } /* Add the "this" parameter. */ fixes this, the question is what other flags remembered from attributes we should copy.=