aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.cc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2022-12-10 00:51:10 +0100
committerMarc Poulhiès <poulhies@adacore.com>2023-01-03 10:29:54 +0100
commitde77a81b2c974520183e6c2f205be54844f3d42e (patch)
treef2f542240a495e9d8495ada7fddc0e17ab16e7be /gcc/expr.cc
parentd3f50f75aa3e5054b28074c029d36c1cbce2d0cb (diff)
downloadgcc-de77a81b2c974520183e6c2f205be54844f3d42e.zip
gcc-de77a81b2c974520183e6c2f205be54844f3d42e.tar.gz
gcc-de77a81b2c974520183e6c2f205be54844f3d42e.tar.bz2
ada: Fix premature finalization of return temporary
Various parts of the expander and the code generator must have a consistent view on which temporaries generated for return statements must be finalized because they are regular temporaries, and which ones must not be since they are allocated on the return stack directly. The Is_Related_To_Func_Return predicate is used for this purpose and needs to be tested consistently. gcc/ada/ * exp_ch6.adb (Expand_Simple_Function_Return): Make sure that a captured function call also verifies Is_Related_To_Func_Return. Do not generate an actual subtype for special return objects. * exp_util.ads (Is_Related_To_Func_Return): Add commentary.
Diffstat (limited to 'gcc/expr.cc')
0 files changed, 0 insertions, 0 deletions