diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2024-10-28 08:33:49 +0100 |
---|---|---|
committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2024-11-12 14:00:53 +0100 |
commit | bb4a081156175cf7ac7a818c6a669d3f63ea0ad8 (patch) | |
tree | 83c09e549bac49295bf396c5cfdb1513865d2583 /gcc/cppdefault.cc | |
parent | c74c88a3e17aa26f57e01dbcce8b4e782a05bfca (diff) | |
download | gcc-bb4a081156175cf7ac7a818c6a669d3f63ea0ad8.zip gcc-bb4a081156175cf7ac7a818c6a669d3f63ea0ad8.tar.gz gcc-bb4a081156175cf7ac7a818c6a669d3f63ea0ad8.tar.bz2 |
ada: Fix premature finalization of anonymous access result from library function
In GNAT's implementation, the finalization of controlled objects created
through anonymous access types occurs when the enclosing library unit goes
out of scope if this is safe, and never occurs otherwise.
The case of a function that is a library unit with an anonymous access
result type falls in the second category for the anonymous access result
type itself and, therefore, finalization cannot take place for it.
gcc/ada/ChangeLog:
PR ada/55725
* exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Be
prepared for no collection if the access type is anonymous.
* exp_ch7.adb (Build_Anonymous_Collection): Return early for the
anonymous access result type of a library function.
Diffstat (limited to 'gcc/cppdefault.cc')
0 files changed, 0 insertions, 0 deletions