ada: Fix internal error on array constant in expression function
commitcab8bb2b3b9ab5b83ac054b088ffd925a0668bdb
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 14 Apr 2023 09:14:47 +0000 (14 11:14 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 30 May 2023 07:12:16 +0000 (30 09:12 +0200)
tree5b4ee74a00c37edbc15bacafd7b6217434e6946f
parent9dbf6adb3e0f849d0622a59b6c722f0d868e6c25
ada: Fix internal error on array constant in expression function

This happens when the peculiar check emitted by Check_Large_Modular_Array
is applied to an object whose actual subtype is an itype with dynamic size,
because the first reference to the itype in the expanded code may turn out
to be within the raise statement, which is problematic for the eloboration
of this itype by the code generator at library level.

gcc/ada/

* freeze.adb (Check_Large_Modular_Array): Fix head comment, use
Standard_Long_Long_Integer_Size directly and generate a reference
just before the raise statement if the Etype of the object is an
itype declared in an open scope.
gcc/ada/freeze.adb