[Ada] Fix internal error on iterated array aggregate
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 9 Mar 2022 23:31:11 +0000 (00:31 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 16 May 2022 08:42:04 +0000 (08:42 +0000)
commite4acb82e97f8043dcd5e6b91b7d3c05d7b478b45
tree14b481d7bbdc031858d7ac0460cb83c21b3118ed
parente6bdaa0299d459e4f0486793bcbeff1bbe75f8a1
[Ada] Fix internal error on iterated array aggregate

The front-end drops the declaration of a temporary on the floor because
Insert_Actions fails to climb up out of an N_Iterated_Component_Association
when the temporary is created during the analysis of its Discrete_Choices.

gcc/ada/

* exp_util.adb (Insert_Actions) <N_Iterated_Component_Association>:
Climb up out of the node if the actions come from Discrete_Choices.
gcc/ada/exp_util.adb