aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2023-08-23 15:11:57 +0200
committerMarc Poulhiès <poulhies@adacore.com>2023-09-05 13:05:17 +0200
commitda4e06d476d55193dad66628160a089e5ec1e737 (patch)
tree0796f8f4237c43b14720eb8e3a69da79de69c775 /gcc
parent7f77d69bc86d25262b88503d0f5e3fff11c7898e (diff)
downloadgcc-da4e06d476d55193dad66628160a089e5ec1e737.zip
gcc-da4e06d476d55193dad66628160a089e5ec1e737.tar.gz
gcc-da4e06d476d55193dad66628160a089e5ec1e737.tar.bz2
ada: Elide the copy in extended returns for nonlimited by-reference types
gcc/ada/ * gcc-interface/trans.cc (gnat_to_gnu): Really test Storage_Pool on the simple return statement.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/gcc-interface/trans.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/gcc-interface/trans.cc b/gcc/ada/gcc-interface/trans.cc
index 5d93060..e99fbb4 100644
--- a/gcc/ada/gcc-interface/trans.cc
+++ b/gcc/ada/gcc-interface/trans.cc
@@ -8519,7 +8519,7 @@ gnat_to_gnu (Node_Id gnat_node)
&& ((Nkind (Parent (gnat_node)) == N_Attribute_Reference
&& lvalue_required_for_attribute_p (Parent (gnat_node)))
|| (Nkind (Parent (gnat_node)) == N_Simple_Return_Statement
- && No (Storage_Pool (gnat_node)))))
+ && No (Storage_Pool (Parent (gnat_node))))))
;
else if (TREE_TYPE (gnu_result) != gnu_result_type)