aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2023-04-08 12:43:54 +0200
committerMarc Poulhiès <poulhies@adacore.com>2023-05-29 10:23:22 +0200
commitfe8b341f09a13e1dcaa2788f123d69122c5cdea5 (patch)
tree48f7fb010bde3a6314ffd0d2ea40c7c914073adf /gcc/ada
parentdf3480cdb6626759b35d1b2527e3f6a6fc4dcc98 (diff)
downloadgcc-fe8b341f09a13e1dcaa2788f123d69122c5cdea5.zip
gcc-fe8b341f09a13e1dcaa2788f123d69122c5cdea5.tar.gz
gcc-fe8b341f09a13e1dcaa2788f123d69122c5cdea5.tar.bz2
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.
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/exp_ch6.adb2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
index 8756046..b19db8f 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 =>