[Ada] Fix compiler crash on FOR iteration scheme over container
authorEric Botcazou <ebotcazou@adacore.com>
Thu, 17 Feb 2022 17:20:01 +0000 (18:20 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Fri, 13 May 2022 08:04:30 +0000 (08:04 +0000)
commit0145570e89270c33d4cf2a0abd2a215f09456789
tree39316f38895b94b3474aa598ad3aabf83b35f391
parent83bacaa9b5d8b652f311633ca9584ea56cd71d86
[Ada] Fix compiler crash on FOR iteration scheme over container

The front-end drops a freeze node on the floor because it puts the node
into the Condition_Actions of an N_Iteration_Scheme of a FOR loop.

gcc/ada/

* exp_util.adb (Insert_Actions) <N_Iteration_Scheme>: Check that
it is a WHILE iteration scheme before using Condition_Actions.
gcc/ada/exp_util.adb