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

--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Marc Poulhies <[email protected]>:

https://gcc.gnu.org/g:2c7a70ef2ddc754b9972111ccb200521895681a5

commit r16-4972-g2c7a70ef2ddc754b9972111ccb200521895681a5
Author: Eric Botcazou <[email protected]>
Date:   Tue Oct 7 22:57:02 2025 +0200

    ada: Fix incorrect static string concatenation with null left string

    It comes from the implementation of an optimization for static
concatenation
    in Resolve_String_Literal, which causes the original subtype of the literal
    to be lost.  Now this subtype must be preserved in the case where the left
    operand of the concatenation may be null, per the 4.5.3(5) subclause.

    gcc/ada/ChangeLog:

            PR ada/122160
            * sem_res.adb (Resolve_Op_Concat_Rest): Do not build the subtype of
            the second operand again if it has already been built.
            (Resolve_String_Literal): Do not defer the creation of the subtype
            for the right operand of a concatenation whose left operand may be
            the null string.
  • [Bug ada/122160] incorrect stat... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to