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

--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-15 branch has been updated by Gaius Mulley
<ga...@gcc.gnu.org>:

https://gcc.gnu.org/g:48e0ad74c108483a8be1d230d497c1331fba7824

commit r15-9992-g48e0ad74c108483a8be1d230d497c1331fba7824
Author: Gaius Mulley <gaiusm...@gmail.com>
Date:   Thu Jul 17 20:41:10 2025 +0100

    [PATCH] PR modula2/120606: FOR loop ICE if the last expression uses an
array

    This patch fixes the ICE which occurs if the last expression is an array.
    It ensures that the start and end values of the for loop expressions are
    dereferenced.

    gcc/m2/ChangeLog:

            PR modula2/120606
            * gm2-compiler/M2Quads.mod (ForLoopLastIterator): Dereference
            start and end expressions e1 and e2 respectively.

    gcc/testsuite/ChangeLog:

            PR modula2/120606
            * gm2/pim/pass/forarray.mod: New test.

    (cherry picked from commit 639a147414ab2b870f9482123fcaa1821e0d5475)

    Signed-off-by: Gaius Mulley <gaiusm...@gmail.com>

Reply via email to