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

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-16 branch has been updated by Gaius Mulley
<[email protected]>:

https://gcc.gnu.org/g:7a2f7618459180734df519ee7fcb77ada91bb249

commit r16-9923-g7a2f7618459180734df519ee7fcb77ada91bb249
Author: Gaius Mulley <[email protected]>
Date:   Sun Nov 8 02:52:32 2026 +0000

    [PATCH] PR modula2/125544: ISO reallocate does not call allocate if the
address is NIL

    This bugfix is for the ISO Storage.REALLOCATE procedure which is a GNU
    extension.  It should behave in the same way as the PIM version by
    first checking whether the pointer parameter is NIL and then calling
    ALLOCATE.

    gcc/m2/ChangeLog:

            PR modula2/125544
            * gm2-libs-iso/Storage.def (REALLOCATE): Updated comment
            describing new behavior.
            * gm2-libs-iso/Storage.mod (REALLOCATE): Check addr
            and call ALLOCATE if NIL else call lowerReallocate.
            (lowerReallocate): New procedure.

    (cherry picked from commit 23229bea30efc917bdb0d65cc6bffade0d2017ea)

    Signed-off-by: Gaius Mulley <[email protected]>

Reply via email to