Message ID | 20230529082953.2411190-1-poulhies@adacore.com |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1368523vqr; Mon, 29 May 2023 01:51:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5S3NGGxtQKy982v0hjDvO413kzLjV6DFAPY28z314g4ssRnHJK5yMmU3xUlQTkGEOlF6b3 X-Received: by 2002:a17:906:7304:b0:96a:30b5:cfb0 with SMTP id di4-20020a170906730400b0096a30b5cfb0mr11464000ejc.22.1685350260515; Mon, 29 May 2023 01:51:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685350260; cv=none; d=google.com; s=arc-20160816; b=AyphjK+C6RntjjKBciXN/ZhLYARH+Nb/Mj67GbVwNATqTekXJEGiiGPUWGCOKAkHdG jXnyh4nksPm9Blq+jPmmQtdcnjC5ys0cClF4qQCWvcgw/OWqtZwZ6/3eNDKx0oPa12po bEL4nh48QqWiLv1fmr2mA/TVIrMd95wv+eyexjnMdU3kJgckQkXBt5fTvIAkfC0SAJcG YW13gpZSPqRixS1OVx5XSCvwzOg8Z1U4TluMIJlZ/+mQ7uhBJUiEufI1uAlAMTmmfx/q tp7pxgp4P/kb03RUB/NlJ5o5/wEzMPSxu049xRW5yXwjcNxsdILM2wo15sNG9WXGfrip Xz3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=W6lVMESuO4Hmm51/vqKiixSNgWy8AAX2CEreQGsvjzM=; b=agpg3jvbn3r3Ttc5et1kSd09V06qWsxIEx18OAR1ZlTPtwdq7QNbW7QW9YAY0xBptB NhFmTryJFTjzvQy29coAvUz4NIXwzso8SVSugaLPOnvk1xH4Ixu8ydT86Oww3H85Cgi7 voAaCUhGkMwVyTwFVTazilMb8uloFeqoNXesnTaSDDyqCnKK4QxdM5amoKEcl6y+U8pf yrDs1YLGFGLIOGj0hOVy49fnmrKbbtsgZd0EUN/SaCg0psoQN6M57Iirkf+UG1gLgc6a mEe2ayx57Shug19HvVrHNOE3OtQzhUdds7UeBcQJLQiQGFDstA8IcYto6Ko2lkvP/C1l 5vug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=yF93x2w7; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id gv58-20020a1709072bfa00b00965b438fe87si6719263ejc.947.2023.05.29.01.51.00 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 01:51:00 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=yF93x2w7; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 79ACB39502E8 for <ouuuleilei@gmail.com>; Mon, 29 May 2023 08:41:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 79ACB39502E8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685349671; bh=W6lVMESuO4Hmm51/vqKiixSNgWy8AAX2CEreQGsvjzM=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=yF93x2w7LSP4m9rVYFKN7WgzeiiEsr2KYaYAMMVQzhw+vrTZr34ILmNl76Zok6eYE uoYDCtRuHi3F08/pjB859qMdO4DY5T07n2o29fm4lEc0cucymrkOtxGto2Oq19jo0z bjEFwHdinkvsCeEAdD3ovtSheLuwRexyHDhmDboo= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by sourceware.org (Postfix) with ESMTPS id CF7E83839DD3 for <gcc-patches@gcc.gnu.org>; Mon, 29 May 2023 08:29:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CF7E83839DD3 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-3f603ff9c02so19491195e9.2 for <gcc-patches@gcc.gnu.org>; Mon, 29 May 2023 01:29:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685348994; x=1687940994; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=W6lVMESuO4Hmm51/vqKiixSNgWy8AAX2CEreQGsvjzM=; b=Y0CS2r2SOAMK9tsp92hP18jlX0YGX2OXFqEdYTD/5gpfzbSlp+gAFgNYVq48GxPZ2v UunV4Z6nETnT7SqB37OqQXycaRmYFQdV8/lL+er8dPrmBu3G5qmn7nx+/Lcgy5NmkPYg HZZuq2LsR3Qfu0s1eFi+0xcCbX7vrMR4Fg3bP+lz5FP1pSHbxB4I0+aLi7OIcx0ixaSR Yjt0srClhZLf07D2x1JgvH0Y3l/lxmgAdZQ98Axn+tj9O+NqzUi43Yh9O3PbiMlNLQxL 4P7R07xo+mKRhxWW+KiDPzSgH0egIpPe6woCTGzqGL5x6NtiY/winXsWhdliciSnWge9 UNbA== X-Gm-Message-State: AC+VfDyRZHloKFx4m/41Yuf1pOADnlt/pS5Q3WfPVGZ25jB4acwfv6ub LHG3Q7tkaPF4Se4+KP9qGA+ZSr1xOlHBFMxBCP9SEQ== X-Received: by 2002:a05:600c:2219:b0:3f6:580:b082 with SMTP id z25-20020a05600c221900b003f60580b082mr9750117wml.0.1685348994727; Mon, 29 May 2023 01:29:54 -0700 (PDT) Received: from poulhies-Precision-5550.telnowedge.local (lmontsouris-659-1-24-67.w81-250.abo.wanadoo.fr. [81.250.175.67]) by smtp.gmail.com with ESMTPSA id o11-20020a05600c378b00b003f195d540d9sm17097997wmr.14.2023.05.29.01.29.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 01:29:54 -0700 (PDT) To: gcc-patches@gcc.gnu.org Cc: Eric Botcazou <ebotcazou@adacore.com> Subject: [COMMITTED] ada: Call idiomatic routine in Expand_Simple_Function_Return Date: Mon, 29 May 2023 10:29:53 +0200 Message-Id: <20230529082953.2411190-1-poulhies@adacore.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: =?utf-8?q?Marc_Poulhi=C3=A8s_via_Gcc-patches?= <gcc-patches@gcc.gnu.org> Reply-To: =?utf-8?q?Marc_Poulhi=C3=A8s?= <poulhies@adacore.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767217834816870070?= X-GMAIL-MSGID: =?utf-8?q?1767217834816870070?= |
Series |
[COMMITTED] ada: Call idiomatic routine in Expand_Simple_Function_Return
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Marc Poulhiès
May 29, 2023, 8:29 a.m. UTC
From: Eric Botcazou <ebotcazou@adacore.com>
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.
Tested on x86_64-pc-linux-gnu, committed on master.
---
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 87560462315..b19db8fb74d 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -6895,7 +6895,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 =>