diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2022-04-12 21:56:35 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2022-05-19 14:05:30 +0000 |
commit | 8be71a90b15916a966553c47857e1579ca22d507 (patch) | |
tree | ad3bac00daf7b04e370ceb3bcf73ea1ac1e28009 /gcc/ada/gcc-interface | |
parent | ca03325fb3a5fbf9c8af853d4c7f199e1adb08e3 (diff) | |
download | gcc-8be71a90b15916a966553c47857e1579ca22d507.zip gcc-8be71a90b15916a966553c47857e1579ca22d507.tar.gz gcc-8be71a90b15916a966553c47857e1579ca22d507.tar.bz2 |
[Ada] Avoid copy operation for returns involving function calls
The underlying issue is that the front-end does not create transient scopes
for return statements, so objects copied for these statements can never be
finalized properly.
gcc/ada/
* exp_ch6.adb (Expand_Call_Helper): Adjust comment.
(Expand_Simple_Function_Return): For the case of a type which needs
finalization and is returned on the primary stack, do not create a
copy if the expression originates from a function call.
* exp_ch7.adb (Transient Scope Management): Adjust comment.
* exp_util.ads (Is_Related_To_Func_Return): Add WARNING line.
* fe.h (Is_Related_To_Func_Return): Declare.
Diffstat (limited to 'gcc/ada/gcc-interface')
0 files changed, 0 insertions, 0 deletions