From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 449A53858D28; Wed, 3 Jan 2024 08:35:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 449A53858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1704270932; bh=G/t/9YBxQzDbLQiWiBRxnpMCMiztHIf6j6jw6Ywkf20=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YqbWoJa58ACzTizDTiWy4oWt5Z9r+q0hZdDS3hEgRkuAvX12jQnTXlhqnzEalKVsq M7rnOMc7SWEHZHq7lcO95xKH/HzuH/HRIw6u0WZZcKTuxgWVRrBeu0xK4ca/R6K8xc FLGb480eV6x/2Be6ZBkZKqFNYnpDv6ZMAo5DJWFo= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/113203] __attribute__ ((always_inline)) fails with C99/LTO/-Og. Date: Wed, 03 Jan 2024 08:35:25 +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: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D113203 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek --- If you want to make something always_inline, define it in the header rather than having just a non-always_inline declaration in the header and definiti= on in some TU. Because without LTO that means it will never be actually attempted to be inlined, and with LTO it can't be inlined until the IPA inlining which -O0 = or -Og don't perform. Or, if the intention is that all calls to the function within its TU are inlined and not the other ones, split the function into two, one always_inl= ine which is used from within the TU and another one which just calls it and is used from other TUs.=