aboutsummaryrefslogtreecommitdiff
path: root/libvtv
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2024-01-21 00:29:45 +0100
committerMarc Poulhiès <poulhies@adacore.com>2024-05-13 10:03:28 +0200
commit8d6c7fccd04944804f7ca0f7ba7b4a3a7f1082dd (patch)
tree20cea0a60d5d967d4da48fd01636ea231b34ed26 /libvtv
parent8e76c189f10ee3b766cfde6b1ccb59b49342b0e5 (diff)
downloadgcc-8d6c7fccd04944804f7ca0f7ba7b4a3a7f1082dd.zip
gcc-8d6c7fccd04944804f7ca0f7ba7b4a3a7f1082dd.tar.gz
gcc-8d6c7fccd04944804f7ca0f7ba7b4a3a7f1082dd.tar.bz2
ada: Restore fix for controlled dynamic allocation with BIP function call
The resolution made some time ago had been that a dynamic allocation for a limited type that needs finalization with a function call as expression always needs to be done in the called function, even if the limited type has a known size. But the fix implementing this resolution was dropped inadvertently at some point. The change also contains a small tweak for Expand_N_Object_Declaration and a small related cleanup in the finalization machinery. gcc/ada/ * exp_ch3.adb (Expand_N_Object_Declaration): In the case of a return object of a BIP function that needs finalization, save the assignment statement made to initialize it, if any. * exp_ch6.ads (BIP_Formal_Kind): Adjust description. * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Make a couple of adjustments to the commentary. (Needs_BIP_Alloc_Form): Also return true if the function needs a BIP_Finalization_Master parameter. * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Remove now always true test on Needs_BIP_Alloc_Form. (Attach_Object_To_Master_Node): Remove duplication in comment.
Diffstat (limited to 'libvtv')
0 files changed, 0 insertions, 0 deletions