[Ada] Premature finalization on build in place return and case expression
authorArnaud Charlet <charlet@adacore.com>
Sat, 19 Sep 2020 08:02:00 +0000 (04:02 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 24 Nov 2020 10:16:03 +0000 (05:16 -0500)
commit13209acd6488700a9c754e0ecff7d654941698ef
tree491e09d48ac48e7439c503ce3a8eb2e237f4f1cd
parent2afd55a57d48106c3fab218ddeaa0a539aa3f000
[Ada] Premature finalization on build in place return and case expression

gcc/ada/

* exp_util.adb (Is_Finalizable_Transient): Take into account return
statements containing N_Expression_With_Actions. Also clean up a
condition to make it more readable.
* exp_ch6.adb: Fix typo.
gcc/ada/exp_ch6.adb
gcc/ada/exp_util.adb