From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0B7EB3858D35; Mon, 8 Jan 2024 09:16:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0B7EB3858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1704705369; bh=i8Frik56PTpnL+xtBknop5CAGUGHT9DUgoXgdj/AaIU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=LfIN23T/MjmEVqfVIGJ92RpOsnvyrxkVmmHPZ9n6HkS5HlS+/xnJvgrgTp7gG0D+E EB16R2ulHcqoXgYDP2XBDncZzBTNd8Z0dnoMQXaQN0eVvcina9LNiMDufAcmTPT6E6 twv0TYeWkCV7h6eBn17BuMU6PayubcxG34XNnd3U= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/113203] __attribute__ ((always_inline)) fails with C99/LTO/-Og. Date: Mon, 08 Jan 2024 09:16:06 +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, documentation X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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: keywords 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 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |documentation CC| |hubicka at gcc dot gnu.org --- Comment #5 from Richard Biener --- With -Og we specifically disable IPA inlining, not considering that always-inline functions might only appear with LTO. I don't think that cross-TU "always-inline" is sensible, and we probably should not merge the always-in= line definition with the not always-inline declaration that's effective for the call in question. So we should accept the code at compile-time but not honor always-inline cross-TU in the way it is presented by the testcase. The bool f(int); declaration should force an out-of-line copy of the C99 inline, right? And GCC always-inline doesn't change that? Btw, the same should happen with -O2 -flto but __attribute__((optimize(0)))= on main(). It might be worth amending the always-inline documentation as well.=