From: Richard Biener <richard.guenther@gmail.com>
To: Roger Sayle <roger@nextmovesoftware.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] PR c/110699: Defend against error_mark_node in gimplify.cc.
Date: Thu, 20 Jul 2023 09:31:58 +0200 [thread overview]
Message-ID: <CAFiYyc1BLMwmUSZ3hNYTWwhfS94h0i34qW0L0kdpmsBSea2CaA@mail.gmail.com> (raw)
In-Reply-To: <003e01d9ba8d$e5cd4390$b167cab0$@nextmovesoftware.com>
On Thu, Jul 20, 2023 at 12:11 AM Roger Sayle <roger@nextmovesoftware.com> wrote:
>
>
> This patch resolves PR c/110699, an ICE-after-error regression, by adding
> a check that the array type isn't error_mark_node in gimplify_compound_lval.
>
> This patch has been tested on x86_64-pc-linux-gnu with make bootstrap
> and make -k check, both with and without --target_board=unix{-m32}
> with no new failures. Ok for mainline?
Can you change it to
if (error_operand_p (TREE_OPERAND (t, 0))
return GS_ERROR;
and do that unconditionally for each 't' on the expr_stack? It seems we only
ever push handled_component_p to it.
OK with that change.
Richard.
>
>
> 2023-07-19 Roger Sayle <roger@nextmovesoftware.com>
>
> gcc/ChangeLog
> PR c/110699
> * gimplify.cc (gimplify_compound_lval): For ARRAY_REF and
> ARRAY_RANGE_REF return GS_ERROR if the array's type is
> error_mark_node.
>
> gcc/testsuite/ChangeLog
> PR c/110699
> * gcc.dg/pr110699.c: New test case.
>
>
> Cheers,
> Roger
> --
>
prev parent reply other threads:[~2023-07-20 7:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-19 22:10 Roger Sayle
2023-07-20 7:31 ` Richard Biener [this message]
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=CAFiYyc1BLMwmUSZ3hNYTWwhfS94h0i34qW0L0kdpmsBSea2CaA@mail.gmail.com \
--to=richard.guenther@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=roger@nextmovesoftware.com \
/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).