public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug modula2/109810] String literal exceeding array causes ICE
Date: Thu, 11 May 2023 23:19:56 +0000	[thread overview]
Message-ID: <bug-109810-4-uMkJysVG4l@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-109810-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Gaius Mulley <gaius@gcc.gnu.org>:

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

commit r14-743-gc787f593e62869ae0b230949b4791f4f3a26e50e
Author: Gaius Mulley <gaiusmod2@gmail.com>
Date:   Fri May 12 00:15:28 2023 +0100

    PR modula2/109810 ICE fix when an array is assigned by a larger string

    This patch fixes an ICE when an array variable is assigned with
    a string which exceeds the array size.  It improves the accuracy
    of the virtual token used to indicate the error message.

    gcc/m2/ChangeLog:

            PR modula2/109810
            * gm2-compiler/M2ALU.mod (ConvertConstToType): Use
            PrepareCopyString in place of DoCopyString.
            * gm2-compiler/M2GenGCC.def (DoCopyString): Rename to ...
            (PrepareCopyString): ... this.
            * gm2-compiler/M2GenGCC.mod (CodeStatement): Call CodeReturnValue
            with a single parameter.  Call CodeXIndr with a single parameter.
            (CodeReturnValue): Remove parameters and replace with a single
            quadno.  Reimplement using PrepareCopyString.  Issue error
            if the string exceeds designator space.
            (DoCopyString): Reimplement and rename to ...
            (PrepareCopyString): ... this.
            (CodeXIndr): Remove parameters and replace with a single
            quadno.  Reimplement using PrepareCopyString.  Issue error
            if the string exceeds designator space.
            (CodeBecomes): Remove parameters and replace with a single
            quadno.  Reimplement using PrepareCopyString.  Issue error
            if the string exceeds designator space.
            * gm2-compiler/M2Quads.def (BuildReturn): Rename parameter to
            tokreturn.
            * gm2-compiler/M2Quads.mod (BuildReturn): Rename parameter to
            tokreturn.  Rename tokno to tokcombined.

    gcc/testsuite/ChangeLog:

            PR modula2/109810
            * gm2/pim/fail/highice.mod: New test.

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

  parent reply	other threads:[~2023-05-11 23:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-11 11:48 [Bug modula2/109810] New: " gaius at gcc dot gnu.org
2023-05-11 11:49 ` [Bug modula2/109810] " gaius at gcc dot gnu.org
2023-05-11 11:52 ` gaius at gcc dot gnu.org
2023-05-11 22:06 ` gaius at gcc dot gnu.org
2023-05-11 22:08 ` gaius at gcc dot gnu.org
2023-05-11 23:19 ` cvs-commit at gcc dot gnu.org [this message]
2023-05-11 23:21 ` gaius at gcc dot gnu.org
2023-07-28 18:28 ` cvs-commit at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-109810-4-uMkJysVG4l@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).