]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Fix bogus Constraint_Error on allocator for access to array of access type
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 12 Dec 2023 09:17:19 +0000 (10:17 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 9 Jan 2024 13:13:32 +0000 (14:13 +0100)
commitbcf7ebba9115cc1e0e1be4c6e00728e0e99e5fc8
tree53a8c6b636bf13ceaa1df580960f8689868f86d4
parent63da219a948a4d9f98f5a0d23e9c19fe48bc0734
ada: Fix bogus Constraint_Error on allocator for access to array of access type

This occurs because the access element type is not its own TYPE_CANONICAL,
which creates a discrepancy between the aliasing support code, which deals
with types directly, and the middle-end which looks at TYPE_CANONICAL only.

gcc/ada/

* gcc-interface/decl.cc (gnat_to_gnu_entity) <E_Array_Type>: Use the
TYPE_CANONICAL of types when it comes to aliasing.
* gcc-interface/utils.cc (relate_alias_sets): Likewise.
gcc/ada/gcc-interface/decl.cc
gcc/ada/gcc-interface/utils.cc