aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2022-04-12 21:56:35 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2022-05-19 14:05:30 +0000
commit8be71a90b15916a966553c47857e1579ca22d507 (patch)
treead3bac00daf7b04e370ceb3bcf73ea1ac1e28009 /gcc/ada/gcc-interface
parentca03325fb3a5fbf9c8af853d4c7f199e1adb08e3 (diff)
downloadgcc-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