ada: Fix (again) incorrect handling of Aggregate aspect
commit3da0e4ae25f15949f87e74aa96a03b47e51a9ff3
authorMarc Poulhiès <poulhies@adacore.com>
Mon, 6 Mar 2023 11:15:13 +0000 (6 12:15 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Thu, 25 May 2023 07:44:17 +0000 (25 09:44 +0200)
tree09216b1633a4b50d3d20f7094d7d3db6484c46b9
parent845d4419da1abe839431af7e6bf5aaecec932486
ada: Fix (again) incorrect handling of Aggregate aspect

Previous fix stopped the processing of the Aggregate aspect early,
skipping the call to Record_Rep_Item, making later call to
Resolve_Container_Aggregate fail.

Also, the previous fix would not handle correctly the case where the
type is private and the check for non-array type can only be done at the
freeze point with the full type.

Adapt the resolving of the aspect when the input is not correct and the
parameters can't be resolved.

gcc/ada/

* sem_ch13.adb (Analyze_One_Aspect): Call Record_Rep_Item.
(Check_Aspect_At_Freeze_Point): Check the aspect is specified on
non-array type only...
(Analyze_One_Aspect): ... instead of doing it too early here.
* sem_aggr.adb (Resolve_Container_Aggregate): Do nothing in case
the parameters failed to resolve.
gcc/ada/sem_aggr.adb
gcc/ada/sem_ch13.adb