]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Fix wrong finalization for double subtype of bounded vector
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 10 May 2023 16:00:36 +0000 (18:00 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Thu, 15 Jun 2023 07:59:38 +0000 (09:59 +0200)
commit59a8207f83855d756a6a87fa4b9537899d88f0a2
tree140d55262f7e2e643710face7cbad2470f4f9c88
parentcc681c83f04fedfad02744c7194a042715a2ec80
ada: Fix wrong finalization for double subtype of bounded vector

The special handling of temporaries created for return values and subject
to a renaming needs to be restricted to the top level, where it is needed
to prevent dangling references to the frame of the elaboration routine from
being created, because, at a lower level, the front-end may create implicit
renamings of objects as these temporaries, so a copy is not allowed.

gcc/ada/

* gcc-interface/decl.cc (gnat_to_gnu_entity) <E_Variable>: Restrict
the special handling of temporaries created for return values and
subject to a renaming to the top level.
gcc/ada/gcc-interface/decl.cc