ada: Fix internal error on address of element of packed array component
commit5a2d82e04d394945087a1a3cdcaf2ed68be8a61b
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 10 Oct 2023 09:13:59 +0000 (10 11:13 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 7 Nov 2023 09:15:00 +0000 (7 10:15 +0100)
treedfcee53b6e9231d88df8b6d1e0666bce63105627
parentab7ccb91e592035261e1cac34d9815b6d58ca1bb
ada: Fix internal error on address of element of packed array component

This occurs when the component is part of a discriminated type and its
offset depends on a discriminant, the problem being that the front-end
generates an incomplete Bit_Position attribute reference.

gcc/ada/

* exp_pakd.adb (Get_Base_And_Bit_Offset): Use the full component
reference instead of just the selector name for 'Bit_Position.
gcc/ada/exp_pakd.adb