]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Fix weird error in Ada.Numerics.Discrete_Random with Component_Alignment
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 18 Oct 2024 07:28:17 +0000 (09:28 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Tue, 12 Nov 2024 13:00:45 +0000 (14:00 +0100)
commitea497d17c11ee7465140aa13a18a0033ba5a2a27
tree118719d87f9db832b458e68c5b7439280674b845
parentbbbfd37f95ac7d058e8b8185a494c782c832f050
ada: Fix weird error in Ada.Numerics.Discrete_Random with Component_Alignment

The problem arises when an instance of Ada.Numerics.Discrete_Random is
covered by a pragma Component_Alignment with a non-default alignment.

gcc/ada/ChangeLog:

* exp_ch5.adb (Expand_Assign_Array): Make Act_Rhs a constant and
do not recompute it, as well as R_Type, when there is a change of
representation.  Move comment about the RHS from here to...
(Expand_N_Assignment_Statement): ...here.
gcc/ada/exp_ch5.adb