]> gcc.gnu.org Git - gcc.git/commit
[Ada] Fix inconsistent building of itypes for null array aggregates
authorPiotr Trojanek <trojanek@adacore.com>
Sun, 31 Jul 2022 20:11:30 +0000 (22:11 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Mon, 5 Sep 2022 07:21:07 +0000 (09:21 +0200)
commit59a23beb9e71a0259b076693dd1e551500c08f24
treede6bb6a37991d0562155dc2dd7904af5ef90f35f
parentb26be61b8d23cc9d7a4e36feeadd9c8f0ec8b909
[Ada] Fix inconsistent building of itypes for null array aggregates

To analyze Ada 2022 null array aggregates we introduced a dedicated
routine and bypassed the code for ordinary array aggregates. However,
the types for the array indexes created by this dedicated routine
differed from the types created for ordinary array aggregates, i.e.
itypes for null array aggregates were associated with the array subtype
declaration, while itypes for ordinary array aggregates were associated
with the aggregate itself. These differences cause trouble for various
routines in GNATprove.

This patch reduces the special handling of null array aggregates and
reuses the building of itypes for ordinary array aggregates.

gcc/ada/

* sem_aggr.adb
(Array_Aggr_Subtype): Bypass call to Collect_Aggr_Bound with
dedicated code for null array aggregates.
(Resolve_Array_Aggregate): Remove special handling of null array
aggregates.
(Resolve_Array_Aggregate): Create bounds, but let
Array_Aggr_Subtype create itype entities.
gcc/ada/sem_aggr.adb
This page took 0.062502 seconds and 5 git commands to generate.