]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Fix crash on aliased variable with packed array type and -g switch
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 5 Aug 2024 11:06:17 +0000 (13:06 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Fri, 23 Aug 2024 08:51:05 +0000 (10:51 +0200)
commit19c22fbea31ae421d5b09a9d0b4f91438310ac45
tree2c9a24dfd6bc26e038e951c937958e3db1384a14
parent87bdd17829e93bf98d8984d6a16ed25081af6c0d
ada: Fix crash on aliased variable with packed array type and -g switch

This comes from a loophole in gnat_get_array_descr_info for record types
containing a template, which represent an aliased array, when this array
type is bit-packed and implemented as a modular integer.

gcc/ada/

* gcc-interface/misc.cc (gnat_get_array_descr_info): Test the
BIT_PACKED_ARRAY_TYPE_P flag only once on the final debug type. In
the case of records containing a template, replay the entire
processing for the array type contained therein.
gcc/ada/gcc-interface/misc.cc