diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2022-02-17 18:20:01 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2022-05-13 08:04:30 +0000 |
commit | 0145570e89270c33d4cf2a0abd2a215f09456789 (patch) | |
tree | 39316f38895b94b3474aa598ad3aabf83b35f391 /gcc | |
parent | 83bacaa9b5d8b652f311633ca9584ea56cd71d86 (diff) | |
download | gcc-0145570e89270c33d4cf2a0abd2a215f09456789.zip gcc-0145570e89270c33d4cf2a0abd2a215f09456789.tar.gz gcc-0145570e89270c33d4cf2a0abd2a215f09456789.tar.bz2 |
[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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/exp_util.adb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index e590751..cd497ee 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -7545,7 +7545,7 @@ package body Exp_Util is when N_Elsif_Part | N_Iteration_Scheme => - if N = Condition (P) then + if Present (Condition (P)) and then N = Condition (P) then if Present (Condition_Actions (P)) then Insert_List_After_And_Analyze (Last (Condition_Actions (P)), Ins_Actions); |