ada: Fix crash on aliased constant with packed array type and -g switch
commit0967e06caaa606eec7b2f222bb9926ec6523ea02
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 12 Jan 2024 09:50:01 +0000 (12 10:50 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 21 May 2024 07:26:49 +0000 (21 09:26 +0200)
treecf89500112dd6d5684dd27bb4c4b9d9d0276c2cc
parentdc775b12224ca18088b5f6a8a7759c426a58b116
ada: Fix crash on aliased constant with packed array type and -g switch

The problem is that we build a template whose array field is not an array
in the case of an aliased object with nominal unconstrained array subtype.

gcc/ada/

* gcc-interface/decl.cc (gnat_to_gnu_entity) <E_Variable>: For an
array allocated with its bounds, make sure to have an array type
to build the template.
gcc/ada/gcc-interface/decl.cc