From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C9707385770D; Wed, 4 Oct 2023 09:21:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C9707385770D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1696411296; bh=AXFYVFp+VxIrB7n3FDlSwMBuzO7cm6cTlth1RcAhC5E=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Grh5H7fwdXwfxs7l9ndCfCITMWfCrfRm9ZSGJ0uRz6QaoXOUBGSGQ2nSa8Ws4RdzH BnNcj6WRrQrnWPGZS+IqYeJBgjA/80IRWMGw6xjpLaphIpk7wsiIAaTH4wEwhOAWoP tE2EaR/ZVuahOkaJgVIUZczHhpzCdBhCUGhy2Fmo= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/111643] __attribute__((flatten)) with -O1 runs out of memory (killed cc1) Date: Wed, 04 Oct 2023 09:21:30 +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: 13.2.0 X-Bugzilla-Keywords: documentation 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: everconfirmed bug_status cf_reconfirmed_on 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=3D111643 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2023-10-04 --- Comment #6 from Richard Biener --- Something like #pragma GCC inline foo (); or [[gnu::inline]] foo (); was mentioned a few times but nobody bothered to implement it (setting a fl= ag on the CALL_EXPR). Will post/push diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index b4770f1a149..645c76f23e9 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -3109,7 +3109,9 @@ file descriptor opened with @code{O_RDONLY}. @cindex @code{flatten} function attribute @item flatten Generally, inlining into a function is limited. For a function marked with -this attribute, every call inside this function is inlined, if possible. +this attribute, every call inside this function is inlined including the +calls such inlining introduces to the function (but not recursive calls +to the function itself), if possible. Functions declared with attribute @code{noinline} and similar are not inlined. Whether the function itself is considered for inlining depends on its size and the current inlining parameters.=