]> 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)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 22 Jul 2025 10:10:00 +0000 (12:10 +0200)
commit633f73c006f94e13dea2a0d5a5423f632c25c38f
treea50a4fe0a9c8a3852e2365a92c259eebfc483962
parente28f90fcc8d8eafcae7fe5bd3ea18cfc194e7d6b
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