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

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Eric Botcazou
<[email protected]>:

https://gcc.gnu.org/g:4910e7f90922b77a506dfbc7dd77ae0c2d8de583

commit r14-12203-g4910e7f90922b77a506dfbc7dd77ae0c2d8de583
Author: Eric Botcazou <[email protected]>
Date:   Tue Dec 16 00:34:31 2025 +0100

    Ada: Fix ICE when comparing reduction expression with integer constant

    This a regression present on the mainline, 15 and 14 branches: the compiler
    aborts on the comparison of the result of a reduction expression, whose
    prefix is an aggregate, and an integer constant, because of a type mismatch
    created by the resolution of the reduction expression, which unduly forces
    Integer on the reduction expression.

    gcc/ada/
            PR ada/123138
            * exp_attr.adb (Expand_N_Attribute_Reference) <Attribute_Reduce>:
            Override a universal numeric type only if the prefix is not an
            aggregate.

    gcc/testsuite/
            * gnat.dg/reduce4.adb: New test.
            * gnat.dg/reduce5.adb: Likewise.

Reply via email to