From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1075) id 959033858D3C; Mon, 8 Nov 2021 17:59:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 959033858D3C MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jan Hubicka To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-5007] Remove workaround allowing interposition of nested functions. X-Act-Checkin: gcc X-Git-Author: Jan Hubicka X-Git-Refname: refs/heads/master X-Git-Oldrev: 0cd653bd2559701da9cc4c9bf51f22bdd68623b5 X-Git-Newrev: d44d791012efda1f48ed647d1d3a1538d15d4e19 Message-Id: <20211108175904.959033858D3C@sourceware.org> Date: Mon, 8 Nov 2021 17:59:04 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Nov 2021 17:59:04 -0000 https://gcc.gnu.org/g:d44d791012efda1f48ed647d1d3a1538d15d4e19 commit r12-5007-gd44d791012efda1f48ed647d1d3a1538d15d4e19 Author: Jan Hubicka Date: Mon Nov 8 18:58:03 2021 +0100 Remove workaround allowing interposition of nested functions. * gimple.c (gimple_call_static_chain_flags): Revert the workaround allowing interposition since issues with binds_to_local_def were hopefully solved. Diff: --- gcc/gimple.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/gimple.c b/gcc/gimple.c index 3d1d3a15b2c..9e65fa61c73 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -1645,13 +1645,13 @@ gimple_call_static_chain_flags (const gcall *stmt) modref_summary *summary = node ? get_modref_function_summary (node) : NULL; + /* Nested functions should always bind to current def since + there is no public ABI for them. */ + gcc_checking_assert (node->binds_to_current_def_p ()); if (summary) { int modref_flags = summary->static_chain_flags; - /* ??? Nested functions should always bind to current def. */ - if (!node->binds_to_current_def_p ()) - modref_flags = interposable_eaf_flags (modref_flags, flags); if (dbg_cnt (ipa_mod_ref_pta)) flags |= modref_flags; }