ada: Fix wrong finalization for case expression in expression function
commit8eb9a6b4c4b68fb39f02608787e2bd9836544cad
authorEric Botcazou <ebotcazou@adacore.com>
Thu, 6 Apr 2023 22:26:19 +0000 (7 00:26 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Mon, 29 May 2023 08:23:21 +0000 (29 10:23 +0200)
tree23acbbee3820a02ebc3c87d327afb8fd06287c1c
parentbbe40e766bf58158427f4c212655c376768b1c75
ada: Fix wrong finalization for case expression in expression function

This happens when the case expression contains a single alternative.

gcc/ada/

* exp_ch5.adb (Expand_N_Case_Statement): Do not remove the statement
if it is the node to be wrapped by a transient scope.
gcc/ada/exp_ch5.adb