]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Fix wrong indirect access to bit-packed array in iterated loop
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 2 Jul 2025 13:25:55 +0000 (15:25 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Tue, 22 Jul 2025 08:35:14 +0000 (10:35 +0200)
commitb14337e3777ac4525ceedd5df3decb63fc271604
tree874c9b0dc5e123654c6e05d0517b14da55ba97d2
parent9ffa0e4301deccce77cc377e27fa510736bb1fb7
ada: Fix wrong indirect access to bit-packed array in iterated loop

This comes from a missing expansion of the bit-packed array reference in
the loop, because the actual subtype created for the dereference lacks a
Packed_Array_Impl_Type as it is ultimately created by the Preanalyze_Range
call present in Analyze_Loop_Statement.

gcc/ada/ChangeLog:

* sem_util.adb (Get_Actual_Subtype): Only create a new subtype when
the expander is active.  Remove a useless test of type inequality,
as well as a useless call to Set_Has_Delayed_Freeze on the subtype.
gcc/ada/sem_util.adb