From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 79E123858C00; Mon, 20 Feb 2023 07:49:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 79E123858C00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676879365; bh=8b/9Qsrq1oBiQHfcDYb5BnM9CmJh+I7QYFWH7H/aP9U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nlknAqAzpXps9MmUW8/icFQb0xvxw2bS2WMbpsYclARRxD8/ZdMGCStcruOaJkEv4 8Cnk3KGC9OyZzNU0+B91CvJ6S0WSF7Dgq0iuBTnB05E0LPyaudo3Owlu8wi0ePKESJ twGukAotxpDQ5P3tTsZds0BrSWUZAt3yY22sUJoM= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/107931] [12/13 Regression] -Og causes always_inline to fail since r12-6677-gc952126870c92cf2 Date: Mon, 20 Feb 2023 07:49:23 +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: rguenth at gcc dot gnu.org 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 #15 from Richard Biener --- (In reply to ishikawa,chiaki from comment #14) > (In reply to Andrew Pinski from comment #13) > > (In reply to ishikawa,chiaki from comment #11) > > > What is exactly the compiler-defined macro when "-Og" is used on the = command > > > line? > >=20 > > There is not one ... >=20 > Thank you for the information. > I see we may have to create a protocol by creating a commonly used macro = to > handle the situation. >=20 > The bugzilla I created at mozilla is > https://bugzilla.mozilla.org/show_bug.cgi?id=3D1817565 >=20 > And the code seems to be a third party code and I was advised to report t= he > issue to the originating github also. > I will. >=20 > Thank you again. >=20 > PS: Given the manual description, it could be gcc-10 and gcc-11 may not h= ave > inlined the functions, but the errors were not reported as such. Oh well. It is generally not possible to compute all indirect call sites to an always_inline function. It would be possible to simply disallow taking the address of an always_inline function but we rejected that based on the use of indirect calls to always_inline functions in the wild but instead opted to document that we do not really support this usage. A weaker option to never emit the body of an always_inline function out-of-line was rejected as well (you'd then a least get linker errors for missed [indirect] calls). We could opt to _not_ diagnose such missed inlines iff the function had its address taken at some point, but then you won't notice missed inlines of always-inline either.=