public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: optimization/7829: GCC 3.1, 3.2 and 3.2.1-pre ICE with -march=athlon + PATCH
@ 2002-09-04 16:36 Alexander Kabaev
  0 siblings, 0 replies; 2+ messages in thread
From: Alexander Kabaev @ 2002-09-04 16:36 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR optimization/7829; it has been noted by GNATS.

From: Alexander Kabaev <kabaev@bellatlantic.net>
To: gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org
Cc: gcc-gnats@gcc.gnu.org, ak03@gte.com
Subject: Re: optimization/7829: GCC 3.1, 3.2 and 3.2.1-pre ICE with -march=athlon + PATCH
Date: Wed, 4 Sep 2002 19:30:28 -0400

 On 4 Sep 2002 21:46:02 -0000
 gcc-gnats@gcc.gnu.org wrote:
 
 > Thank you very much for your problem report.
 > It has the internal identification `optimization/7829'.
 > The individual assigned to look at your
 > report is: unassigned. 
 > 
 > >Category:       optimization
 > >Responsible:    unassigned
 > >Synopsis:       -march=athlon causes GCC3 to fail with ICE
 > >Arrival-Date:   Wed Sep 04 14:46:01 PDT 2002
 > 
 The loop.c revision 1.398 on trunk provides a more complete fix already.
 Can this change be committed to gcc-3_2-branch?
 
 -- 
 Alexander Kabaev
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* optimization/7829: GCC 3.1, 3.2 and 3.2.1-pre ICE with -march=athlon + PATCH
@ 2002-09-04 14:46 ak03
  0 siblings, 0 replies; 2+ messages in thread
From: ak03 @ 2002-09-04 14:46 UTC (permalink / raw)
  To: gcc-gnats


>Number:         7829
>Category:       optimization
>Synopsis:       -march=athlon causes GCC3 to fail with ICE
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 04 14:46:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Alexander N. Kabaev
>Release:        3.2 [FreeBSD]
>Organization:
>Environment:
System: FreeBSD ork.gte.com 4.6-STABLE FreeBSD 4.6-STABLE #1: Mon Aug 12 12:13:55 EDT 2002 root@ork.gte.com:/usr/src/sys/compile/KAN i386


	
host: i386-portbld-freebsd4.6
build: i386-portbld-freebsd4.6
target: i386-portbld-freebsd4.6
configured with: ./..//gcc-3.2/configure --disable-nls --with-gnu-as --with-gnu-ld --with-gxx-include-dir=/usr/local/lib/gcc-lib/i386-portbld-freebsd4.6/3.2/include/g++ --disable-shared --prefix=/usr/local i386-portbld-freebsd4.6
>Description:
	The sample code below causes GCC versions 3.1.1, 3.2 and the one built
        from the top of gcc-3_2-branch to die with message:

$ gcc32 -O -march=athlon -c bad.c
bad.c: In function `gbkext1_mbtowc':
bad.c:5: unrecognizable insn:
(insn 55 53 57 (set (reg:QI 68)
        (const_int 128 [0x80])) -1 (nil)
    (nil))
bad.c:5: Internal compiler error in extract_insn, at recog.c:2148
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

0x80 is not a valid representation for 128 in QImode. It should
be 0xffffff80 (i.e. sign extended) for insn to be recognized.
 
The proposed one-line patch seems to fix the problem.
   
>How-To-Repeat:

static unsigned int
gbkext1_mbtowc (unsigned char c1, unsigned char c2)
{
  return  c1 + (c2 - (c2 >= 0x80 ? 0x41 : 0x40));
}

>Fix:

Index: loop.c
===================================================================
RCS file: /usr/ncvs/src/contrib/gcc/loop.c,v
retrieving revision 1.1.1.13
diff -u -r1.1.1.13 loop.c
--- loop.c	1 Sep 2002 20:37:48 -0000	1.1.1.13
+++ loop.c	4 Sep 2002 14:28:06 -0000
@@ -9278,7 +9278,8 @@
 
 	case LEU:
 	  if (uconst_val < max_val)
-	    code = LTU, op1 = GEN_INT (uconst_val + 1);
+	    code = LTU, op1 = GEN_INT (
+	      trunc_int_for_mode (uconst_val + 1, GET_MODE (op0)));
 	  break;
 
 	case GEU:
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-09-04 23:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-04 16:36 optimization/7829: GCC 3.1, 3.2 and 3.2.1-pre ICE with -march=athlon + PATCH Alexander Kabaev
  -- strict thread matches above, loose matches on Subject: below --
2002-09-04 14:46 ak03

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).