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

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

https://gcc.gnu.org/g:e9a81addd5b7d018e173fa8d59aafc2f84e41d8b

commit r16-104-ge9a81addd5b7d018e173fa8d59aafc2f84e41d8b
Author: Gaius Mulley <[email protected]>
Date:   Thu Apr 24 02:39:36 2025 +0100

    PR modula2/119914 No error message generated when passing a Ztype to an
unbounded array

    This patch detects constants ZType, RType, CType being passed to unbounded
    arrays and generates an error message highlighting the formal and
    actual parameters in error.

    gcc/m2/ChangeLog:

            PR modula2/119914
            * gm2-compiler/M2Check.mod (checkConstMeta): Add check for
            Ztype, Rtype and Ctype and unbounded arrays.
            (IsZRCType): New procedure function.
            (isZRC): Add comment.
            * gm2-compiler/M2Quads.mod:
            * gm2-compiler/M2Range.mod (gdbinit): New procedure.
            (BreakWhenRangeCreated): Ditto.
            (CheckBreak): Ditto.
            (InitRange): Call CheckBreak.
            (Init): Add gdbhook and initialize interactive watch point.
            * gm2-compiler/SymbolTable.def (GetNthParamAnyClosest): New
            procedure function.
            * gm2-compiler/SymbolTable.mod (BreakSym): Remove constant.
            (BreakSym): Add Variable.
            (stop): Remove.
            (gdbhook): New procedure.
            (BreakWhenSymCreated): Ditto.
            (CheckBreak): Ditto.
            (NewSym): Call CheckBreak.
            (Init): Add gdbhook and initialize interactive watch point.
            (MakeProcedure): Replace guarded call to stop with CheckBreak.
            (GetNthParamChoice): New procedure function.
            (GetNthParamOrdered): Ditto.
            (GetNthParamAnyClosest): Ditto.
            (GetOuterModuleScope): Ditto.

    gcc/testsuite/ChangeLog:

            PR modula2/119914
            * gm2/pim/fail/constintarraybyte.mod: New test.

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

Reply via email to