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 middle-end/80270] [9/10/11/12 Regression ICE in extract_bit_field_1 at gcc/expmed.c:1798
Date: Mon, 28 Feb 2022 22:27:55 +0000	[thread overview]
Message-ID: <bug-80270-4-pwqN6MHq2x@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-80270-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Roger Sayle <sayle@gcc.gnu.org>:

https://gcc.gnu.org/g:7e5c6edeb1b2339e10f10bee270e61dbad985800

commit r12-7416-g7e5c6edeb1b2339e10f10bee270e61dbad985800
Author: Roger Sayle <roger@nextmovesoftware.com>
Date:   Mon Feb 28 22:26:43 2022 +0000

    PR middle-end/80270: ICE in extract_bit_field_1

    This patch fixes PR middle-end/80270, an ICE-on-valid regression, where
    performing a bitfield extraction on a variable explicitly stored in a
    hard register by the user causes a segmentation fault during RTL
    expansion.  Nearly identical source code without the "asm" qualifier
    compiles fine.  The point of divergence is in simplify_gen_subreg
    which tries to avoid creating non-trivial SUBREGs of hard registers,
    to avoid problems during register allocation.  This suggests the
    simple solution proposed here, to copy hard registers to a new pseudo
    in extract_integral_bit_field, just before calling simplify_gen_subreg.

    2022-02-28  Roger Sayle  <roger@nextmovesoftware.com>
                Eric Botcazou  <ebotcazou@adacore.com>

    gcc/ChangeLog
            PR middle-end/80270
            * expmed.cc (extract_integral_bit_field): If OP0 is a hard
            register, copy it to a pseudo before calling simplify_gen_subreg.

    gcc/testsuite/ChangeLog
            * gcc.target/i386/pr80270.c: New test case.

  parent reply	other threads:[~2022-02-28 22:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-80270-4@http.gcc.gnu.org/bugzilla/>
2021-07-24  9:17 ` [Bug middle-end/80270] " pinskia at gcc dot gnu.org
2021-09-22 23:46 ` pinskia at gcc dot gnu.org
2021-09-22 23:58 ` [Bug middle-end/80270] [9/10/11/12 Regression " pinskia at gcc dot gnu.org
2022-02-27  8:54 ` roger at nextmovesoftware dot com
2022-02-28 22:27 ` cvs-commit at gcc dot gnu.org [this message]
2022-03-02 12:06 ` roger at nextmovesoftware dot com

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-80270-4-pwqN6MHq2x@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).