public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "aoliva at redhat dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/20491] [4.0/4.1 Regression] internal compiler error: in subreg_regno_offset, at rtlanal.c:3042
Date: Sat, 02 Apr 2005 16:57:00 -0000	[thread overview]
Message-ID: <20050402165728.5602.qmail@sourceware.org> (raw)
In-Reply-To: <20050316021720.20491.aelschuring@hotmail.com>


------- Additional Comments From aoliva at gcc dot gnu dot org  2005-04-02 16:57 -------
Subject: Re: [PR middle-end/20491] combine generates bad subregs

On Mar 31, 2005, Richard Henderson <rth@gcc.gnu.org> wrote:

> On Wed, Mar 30, 2005 at 04:27:50PM -0300, Alexandre Oliva wrote:
>> -      else
>> +      else if (REG_P (y))
>> {
>> /* Simplify_subreg can't handle some REG cases, but we have to.  */
>> unsigned int regno = subreg_regno (x);

> The next line is 

>           gcc_assert (REG_P (y));

> you should remove that.  Ok with that change.

Thanks, here's what I'm checking in.

Index: gcc/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	PR middle-end/20491
	* final.c (alter_subreg): Don't call subreg_regno for a non-REG.

Index: gcc/final.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/final.c,v
retrieving revision 1.349
diff -u -p -r1.349 final.c
--- gcc/final.c	1 Apr 2005 15:27:58 -0000	1.349
+++ gcc/final.c	1 Apr 2005 20:19:02 -0000
@@ -2547,11 +2547,10 @@ alter_subreg (rtx *xp)
 
       if (new != 0)
 	*xp = new;
-      else
+      else if (REG_P (y))
 	{
 	  /* Simplify_subreg can't handle some REG cases, but we have to.  */
 	  unsigned int regno = subreg_regno (x);
-	  gcc_assert (REG_P (y));
 	  *xp = gen_rtx_REG_offset (y, GET_MODE (x), regno, SUBREG_BYTE (x));
 	}
     }

-- 
Alexandre Oliva             http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20491


  parent reply	other threads:[~2005-04-02 16:57 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-16  2:17 [Bug c/20491] New: " aelschuring at hotmail dot com
2005-03-16  2:27 ` [Bug middle-end/20491] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-03-24  8:56 ` aoliva at gcc dot gnu dot org
2005-03-24  9:26 ` aoliva at redhat dot com
2005-03-24 10:46 ` aoliva at redhat dot com
2005-03-24 12:33 ` kenner at vlsi1 dot ultra dot nyu dot edu
2005-03-24 18:08 ` pinskia at gcc dot gnu dot org
2005-03-25 13:41 ` aoliva at redhat dot com
2005-03-28 22:11 ` rth at gcc dot gnu dot org
2005-03-29 21:36 ` cvs-commit at gcc dot gnu dot org
2005-03-29 21:36 ` cvs-commit at gcc dot gnu dot org
2005-03-29 21:48 ` aoliva at redhat dot com
2005-03-29 22:23 ` aoliva at gcc dot gnu dot org
2005-03-30 16:23 ` jsm28 at gcc dot gnu dot org
2005-03-30 18:51 ` pinskia at gcc dot gnu dot org
2005-03-30 19:00 ` aoliva at gcc dot gnu dot org
2005-03-30 19:28 ` aoliva at redhat dot com
2005-03-31 22:09 ` rth at gcc dot gnu dot org
2005-04-02 16:56 ` cvs-commit at gcc dot gnu dot org
2005-04-02 16:57 ` aoliva at redhat dot com [this message]
2005-04-02 16:57 ` cvs-commit at gcc dot gnu dot org
2005-04-02 17:07 ` aoliva at gcc dot gnu dot org
2005-04-03 15:21 ` jsm28 at gcc dot gnu dot org
2005-04-03 17:04 ` pinskia at gcc dot gnu dot org
2005-04-03 18:19 ` danglin at gcc dot gnu dot org
2005-04-04 18:20 ` joseph at codesourcery dot com
2005-04-05 11:50 ` jsm28 at gcc dot gnu dot org
2005-04-05 14:59 ` pinskia at gcc dot gnu dot org
2005-04-16 10:38 ` cvs-commit at gcc dot gnu dot org
2005-04-16 10:43 ` cvs-commit at gcc dot gnu dot org
2005-04-16 22:04 ` pinskia at gcc dot gnu dot org
2005-04-17  4:01 ` mmitchel at gcc dot gnu dot org
2005-04-17 10:59 ` [Bug middle-end/20491] " jsm28 at gcc dot gnu dot org
2005-04-19  4:37 ` aoliva at gcc dot gnu dot 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=20050402165728.5602.qmail@sourceware.org \
    --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).