public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-7877] ada: Call idiomatic routine in Expand_Simple_Function_Return
@ 2023-09-27  8:26 Eric Botcazou
  0 siblings, 0 replies; only message in thread
From: Eric Botcazou @ 2023-09-27  8:26 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:6a8e6f7b072263b56e3e4fe897eb1df696030020

commit r13-7877-g6a8e6f7b072263b56e3e4fe897eb1df696030020
Author: Eric Botcazou <ebotcazou@adacore.com>
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     =>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-09-27  8:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-27  8:26 [gcc r13-7877] ada: Call idiomatic routine in Expand_Simple_Function_Return Eric Botcazou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).