public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bergner at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/112822] [14 regression] ICE: invalid RHS for gimple memory store after r14-5831-gaae723d360ca26
Date: Mon, 11 Dec 2023 18:08:42 +0000 [thread overview]
Message-ID: <bug-112822-4-8maGlopAzr@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-112822-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112822
--- Comment #7 from Peter Bergner <bergner at gcc dot gnu.org> ---
(In reply to Martin Jambor from comment #5)
> diff --git a/gcc/tree-sra.cc b/gcc/tree-sra.cc
> index 3bd0c7a9af0..99a1b0a6d17 100644
> --- a/gcc/tree-sra.cc
> +++ b/gcc/tree-sra.cc
> @@ -4219,11 +4219,15 @@ load_assign_lhs_subreplacements (struct access *lacc,
> if (racc && racc->grp_to_be_replaced)
> {
> rhs = get_access_replacement (racc);
> + bool vce = false;
> if (!useless_type_conversion_p (lacc->type, racc->type))
> - rhs = fold_build1_loc (sad->loc, VIEW_CONVERT_EXPR,
> - lacc->type, rhs);
> + {
> + rhs = fold_build1_loc (sad->loc, VIEW_CONVERT_EXPR,
> + lacc->type, rhs);
> + vce = true;
> + }
>
> - if (racc->grp_partial_lhs && lacc->grp_partial_lhs)
> + if (lacc->grp_partial_lhs && (vce || racc->grp_partial_lhs))
> rhs = force_gimple_operand_gsi (&sad->old_gsi, rhs, true,
> NULL_TREE, true,
> GSI_SAME_STMT);
> }
This fixes the ICE on the large original test case and the smaller test cases.
I'll bootstrap and regtest it and report back on the results.
next prev parent reply other threads:[~2023-12-11 18:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-02 2:24 [Bug middle-end/112822] New: " seurer at gcc dot gnu.org
2023-12-02 2:43 ` [Bug middle-end/112822] " pinskia at gcc dot gnu.org
2023-12-02 2:43 ` pinskia at gcc dot gnu.org
2023-12-02 18:30 ` bergner at gcc dot gnu.org
2023-12-04 3:22 ` bergner at gcc dot gnu.org
2023-12-04 7:01 ` rguenth at gcc dot gnu.org
2023-12-11 15:30 ` jamborm at gcc dot gnu.org
2023-12-11 16:27 ` jamborm at gcc dot gnu.org
2023-12-11 17:53 ` bergner at gcc dot gnu.org
2023-12-11 18:08 ` bergner at gcc dot gnu.org [this message]
2023-12-11 19:57 ` bergner at gcc dot gnu.org
2023-12-12 16:56 ` [Bug tree-optimization/112822] " jamborm at gcc dot gnu.org
2023-12-12 20:21 ` cvs-commit at gcc dot gnu.org
2023-12-12 22:46 ` cvs-commit at gcc dot gnu.org
2023-12-12 22:48 ` bergner at gcc dot gnu.org
2023-12-13 14:14 ` 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-112822-4-8maGlopAzr@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).