public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Richard Biener <rguenth@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-4828] middle-end/107994 - ICE after error with comparison gimplification Date: Wed, 21 Dec 2022 12:13:15 +0000 (GMT) [thread overview] Message-ID: <20221221121315.1F8B33857B9B@sourceware.org> (raw) https://gcc.gnu.org/g:845b514e8a150447ba041294586af76a6ac05158 commit r13-4828-g845b514e8a150447ba041294586af76a6ac05158 Author: Richard Biener <rguenther@suse.de> Date: Wed Dec 21 12:27:58 2022 +0100 middle-end/107994 - ICE after error with comparison gimplification The following avoids passing down error_mark_node to fold_convert. PR middle-end/107994 * gimplify.cc (gimplify_expr): Catch errorneous comparison operand. Diff: --- gcc/gimplify.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/gimplify.cc b/gcc/gimplify.cc index 250782b1140..c9c800a5850 100644 --- a/gcc/gimplify.cc +++ b/gcc/gimplify.cc @@ -17098,6 +17098,9 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, Compare scalar mode aggregates as scalar mode values. Using memcmp for them would be very inefficient at best, and is plain wrong if bitfields are involved. */ + if (error_operand_p (TREE_OPERAND (*expr_p, 1))) + ret = GS_ERROR; + else { tree type = TREE_TYPE (TREE_OPERAND (*expr_p, 1)); @@ -17122,9 +17125,8 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, ret = gimplify_scalar_mode_aggregate_compare (expr_p); else ret = gimplify_variable_sized_compare (expr_p); - - break; } + break; /* If *EXPR_P does not need to be special-cased, handle it according to its class. */
reply other threads:[~2022-12-21 12:13 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20221221121315.1F8B33857B9B@sourceware.org \ --to=rguenth@gcc.gnu.org \ --cc=gcc-cvs@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: linkBe 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).