[Ada] Fix wrong access check with access-to-unconstrained-array
commit6071ef0bed2081dd1ecd89299127ae07077df1f3
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 20 Jun 2022 22:50:54 +0000 (21 00:50 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 13 Jul 2022 10:01:19 +0000 (13 10:01 +0000)
tree8ec4553a66b9ce8337def6aa714e15e1515fd286
parent84d3047b14b85b680ee3c88a9a214bbea9c260fc
[Ada] Fix wrong access check with access-to-unconstrained-array

The current implementation may create dangling references from a superset
of the alias set of the dummy pointer-to-array type when it exists.

gcc/ada/

* gcc-interface/decl.cc (gnat_to_gnu_entity) <E_Array_Type>: Save
and restore the alias set of the dummy pointer-to-array type.
gcc/ada/gcc-interface/decl.cc