From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6D00F3814F89; Mon, 20 Feb 2023 10:51:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6D00F3814F89 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676890274; bh=eFv5ixhxYeZNuA54ZR8m+UIC5hlfnXu/AXC2TFPi12U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mrB9j11cjgVAuZsZVqUaP1VuTLT3u6peYfxAW4WPZqlvdm73hNNbVwe0iVD+e1v4S DSFFnbDYt8uPZwoNwUs4M6kb2mteOSO1SlgAdnRCnUs8dzO7lIGUF4DLXClTX5sN+O 74vTI3rYud6ejcRgfK8KfANvI9HDKy+JlHn8XjBc= 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: Mon, 20 Feb 2023 10:51:13 +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 #17 from rguenther at suse dot de --- On Mon, 20 Feb 2023, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107931 >=20 > --- Comment #16 from Jakub Jelinek --- > As discussed elsewhere, always_inline is used in various ways, in some us= ers I > guess would like to see an error if it wasn't inlined, but e.g. the uses = in > glibc for _FORTIFY_SOURCE where many of the standard C or POSIX APIs have > extern inline wrappers with always_inline and gnu_inline attributes. In = that > case always_inline is used there for security reasons (not inlining it me= ans > the security checks aren't done) but on the other side C/POSIX requires &= open > or &printf to work too. With GNU extern inline always_inline it would work to never emit bodies of always_inline functions to get the errors diagnosed at link time. Possibly standard C inline plus always_inline would work the same if we then treat the out of line instantiation as the destination for indirect calls. But I think the cgraph code is still not 100% accurate in reflecting reality with extern inlines (and possibly C 'inline' and instantiations), since it doesn't treat the inline copy and the out of line copy=20 separately.=