https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106037

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
   Target Milestone|---                         |13.3
            Summary|ICE with Aggregate aspect   |internal error with
                   |                            |Aggregate aspect on array
                   |                            |type
         Resolution|---                         |FIXED

--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
commit ec48b99c24a422bf97af91e82203d23b69094e7c
Author: Marc Poulhiès <poulh...@adacore.com>
Date:   Wed Mar 8 20:39:45 2023 +0100

    ada: Fix error message for Aggregate aspect

    The error message was wrongly using % instead of & in the format string,
    causing the displayed message to refer to incorrect names in some cases.

    gcc/ada/

            * sem_ch13.adb (Check_Aspect_At_Freeze_Point): fix format string,
            use existing local Ident.

commit 3da0e4ae25f15949f87e74aa96a03b47e51a9ff3
Author: Marc Poulhiès <poulh...@adacore.com>
Date:   Mon Mar 6 12:15:13 2023 +0100

    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.

commit fd694822ca6eda8b08fea10fcabdb0ad508a963e
Author: Marc Poulhiès <poulh...@adacore.com>
Date:   Tue Feb 28 17:10:29 2023 +0100

    ada: Fix incorrect handling of Aggregate aspect

    This change fixes 2 incorrect handlings of the aspect.
    The arguments are now correctly resolved and the aspect is rejected on
    non array types.

    gcc/ada/
            * sem_ch13.adb (Analyze_One_Aspect): Mark Aggregate aspect as
            needing delayed resolution and reject the aspect on non-array
            type.

Reply via email to