diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2022-11-16 03:58:17 +0100 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2022-11-21 11:10:35 +0100 |
commit | 2473f28d79c480192aba783a08de8b0285c08213 (patch) | |
tree | 3ab3e312c54782f72ac38e0fb6e578c2cc80440b /gcc/ada/gcc-interface/decl.cc | |
parent | a186dd158decad693bd18c95962a9ea61022166c (diff) | |
download | gcc-2473f28d79c480192aba783a08de8b0285c08213.zip gcc-2473f28d79c480192aba783a08de8b0285c08213.tar.gz gcc-2473f28d79c480192aba783a08de8b0285c08213.tar.bz2 |
ada: Adjust recent change for returns involving function calls
gcc/ada/
* gcc-interface/decl.cc (gnat_to_gnu_entity) <E_Constant>: Revert
latest change.
* gcc-interface/trans.cc (gnat_to_gnu) <N_Object_Declaration>:
Tweak latest change.
Diffstat (limited to 'gcc/ada/gcc-interface/decl.cc')
-rw-r--r-- | gcc/ada/gcc-interface/decl.cc | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc index e25ce49..c383f9b 100644 --- a/gcc/ada/gcc-interface/decl.cc +++ b/gcc/ada/gcc-interface/decl.cc @@ -637,17 +637,6 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition) break; case E_Constant: - /* If this is a constant related to a return in a function returning by - invisible reference without expression, get the return object. */ - if (Is_Related_To_Func_Return (gnat_entity) - && current_function_decl - && TREE_ADDRESSABLE (TREE_TYPE (current_function_decl)) - && !gnu_expr) - { - gnu_decl = DECL_RESULT (current_function_decl); - break; - } - /* Ignore constant definitions already marked with the error node. See the N_Object_Declaration case of gnat_to_gnu for the rationale. */ if (definition |