From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 179003858028; Fri, 2 Dec 2022 07:22:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 179003858028 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669965765; bh=xJnwHVAm2ak8upDne0YEzuvMrxq7nVR+x2aLkkkIfDc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=TvAizWo+mdM81l0VISfx+VwMWw2NEx8WEPKee+/XQOalbl7peRo4PaDW/YYtm1kOh 4IP4Bhnvub8i46xYTqLQE7yFYoqYDYxcu/avOFkn5WsdR55haeYTEmgL2oFHIlRU72 pV9ZczqtCP3R3U8czeD7RuzH2ZOhnWVPUFFoVvLw= From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/107931] [12/13 Regression] -Og causes always_inline to fail since r12-6677-gc952126870c92cf2 Date: Fri, 02 Dec 2022 07:22:44 +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: 12.2.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.3 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=3D107931 --- Comment #7 from rguenther at suse dot de --- On Thu, 1 Dec 2022, me at xenu dot pl wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107931 >=20 > --- Comment #5 from Tomasz Konojacki --- > To sum this thread up, there are undocumented rules that can cause a > semantically identical program to be rejected by the compiler under certa= in > optimisation levels (with an uninformative error message) and users are > expected to know them. >=20 > Thank you. It's even documented (I've marked the relevant sentence with ---> ... <---): @item always_inline @cindex @code{always_inline} function attribute Generally, functions are not inlined unless optimization is specified. For functions declared inline, this attribute inlines the function independent of any restrictions that otherwise apply to inlining. Failure to inline such a function is diagnosed as an error. ---> Note that if such a function is called indirectly the compiler may or may not inline it depending on optimization level and a failure to inline an indirect call may or may not be diagnosed. <---=