From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1285) id 217B13850867; Wed, 27 Sep 2023 08:26:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 217B13850867 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1695803163; bh=8Xv2u2iiPUwPhrinuYV2eGOUMXPv9aKFeMvy2u1zlaw=; h=From:To:Subject:Date:From; b=xHtUE3xWAHxGXtpheAhjqToGQQgg24FyzOqq79YXsLp14hiRAKJ6h8SNoqkNpCig4 FtDUiEMs5DutSPYz/1aLq16G5STFxVHjmMSqnHZVQ+++gLoH7KMw26+mOVPNYF/p8U FlV0HgH3HUCJ0ctMDB9kNy5RLmeVsKDWrZPtWcTc= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Eric Botcazou To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-7877] ada: Call idiomatic routine in Expand_Simple_Function_Return X-Act-Checkin: gcc X-Git-Author: Eric Botcazou X-Git-Refname: refs/heads/releases/gcc-13 X-Git-Oldrev: 7d149f954070b65d7b7dd1cd48cc7f8eda01a897 X-Git-Newrev: 6a8e6f7b072263b56e3e4fe897eb1df696030020 Message-Id: <20230927082603.217B13850867@sourceware.org> Date: Wed, 27 Sep 2023 08:26:02 +0000 (GMT) List-Id: https://gcc.gnu.org/g:6a8e6f7b072263b56e3e4fe897eb1df696030020 commit r13-7877-g6a8e6f7b072263b56e3e4fe897eb1df696030020 Author: Eric Botcazou Date: Sat Apr 8 12:43:54 2023 +0200 ada: Call idiomatic routine in Expand_Simple_Function_Return In the primary stack case, Insert_Actions is invoked when the expression is being rewritten, whereas Insert_List_Before_And_Analyze is invoked in the secondary stack case. The former is idiomatic, the latter is not. gcc/ada/ * exp_ch6.adb (Expand_Simple_Function_Return): Call Insert_Actions consistently when rewriting the expression. Diff: --- gcc/ada/exp_ch6.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index aee67d4546b..81362ad571c 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -6830,7 +6830,7 @@ package body Exp_Ch6 is Temp := Make_Temporary (Loc, 'R', Alloc_Node); - Insert_List_Before_And_Analyze (N, New_List ( + Insert_Actions (Exp, New_List ( Make_Full_Type_Declaration (Loc, Defining_Identifier => Acc_Typ, Type_Definition =>