aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.cc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2023-11-08 23:29:01 +0100
committerMarc Poulhiès <poulhies@adacore.com>2023-11-28 10:35:47 +0100
commitf6bbf84ec759f203251c6c5a0dec8344f17cc614 (patch)
tree9a4bc73fe32caa9a3655749261b68dedf5036823 /gcc/tree.cc
parentd2f2b9e6f9bcc2398f7e9a5a42dfa55053bdb0bf (diff)
downloadgcc-f6bbf84ec759f203251c6c5a0dec8344f17cc614.zip
gcc-f6bbf84ec759f203251c6c5a0dec8344f17cc614.tar.gz
gcc-f6bbf84ec759f203251c6c5a0dec8344f17cc614.tar.bz2
ada: Fix premature finalization for nested return within extended one
The return object is incorrectly finalized when the nested return is taken, because the special flag attached to the return object is not updated. gcc/ada/ * exp_ch6.adb (Build_Flag_For_Function): New function made up of the code building the special flag for return object present... (Expand_N_Extended_Return_Statement): ...in there. Replace the code with a call to Build_Flag_For_Function. Add assertion for the flag. (Expand_Non_Function_Return): For a nested return, if the return object needs finalization actions, update the special flag.
Diffstat (limited to 'gcc/tree.cc')
0 files changed, 0 insertions, 0 deletions