public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: middle-end/7245: ICE in find_reloads
@ 2002-07-09 12:46 paolo
0 siblings, 0 replies; 6+ messages in thread
From: paolo @ 2002-07-09 12:46 UTC (permalink / raw)
To: aj, gcc-bugs, gcc-prs, nobody, paolo, uli
Synopsis: ICE in find_reloads
Responsible-Changed-From-To: paolo->unassigned
Responsible-Changed-By: paolo
Responsible-Changed-When: Tue Jul 9 12:46:07 2002
Responsible-Changed-Why:
Assigned to myself by mistake.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7245
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: middle-end/7245: ICE in find_reloads
@ 2002-09-29 9:40 sayle
0 siblings, 0 replies; 6+ messages in thread
From: sayle @ 2002-09-29 9:40 UTC (permalink / raw)
To: aj, gcc-bugs, gcc-prs, jakub, uli
Synopsis: ICE in find_reloads
State-Changed-From-To: analyzed->closed
State-Changed-By: sayle
State-Changed-When: Sun Sep 29 09:40:03 2002
State-Changed-Why:
I've just reconfirmed that this has been fixed both on
the 3.2 branch and mainline by Jakub's patch:
2002-07-15 Jakub Jelinek <jakub@redhat.com>
PR middle-end/7245
* config/i386/i386.c (const_int_1_31_operand): New.
* config/i386/i386.h (PREDICATE_CODES): Add it.
* config/i386/i386.md (ashlsi3_cmp, ashlsi3_cmp_zext, ashlhi3_cmp,
ashlqi3_cmp, ashrsi3_cmp, ashrsi3_cmp_zext, ashrhi3_cmp, ashrqi3_cmp,
lshrsi3_cmp, lshrsi3_cmp_zext, lshrhi3_cmp, lshrqi3_cmp): Use it.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7245
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: middle-end/7245: ICE in find_reloads
@ 2002-07-10 9:38 jakub
0 siblings, 0 replies; 6+ messages in thread
From: jakub @ 2002-07-10 9:38 UTC (permalink / raw)
To: aj, gcc-bugs, gcc-prs, jakub, nobody, uli
Synopsis: ICE in find_reloads
Responsible-Changed-From-To: unassigned->jakub
Responsible-Changed-By: jakub
Responsible-Changed-When: Wed Jul 10 09:38:19 2002
Responsible-Changed-Why:
http://gcc.gnu.org/ml/gcc-patches/2002-07/msg00445.html
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7245
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: middle-end/7245: ICE in find_reloads
@ 2002-07-09 12:56 Michael Matz
0 siblings, 0 replies; 6+ messages in thread
From: Michael Matz @ 2002-07-09 12:56 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR middle-end/7245; it has been noted by GNATS.
From: Michael Matz <matz@suse.de>
To: Andreas Jaeger <aj@suse.de>
Cc: <gcc-gnats@gcc.gnu.org>, Ulrich Hecht <uli@suse.de>
Subject: Re: middle-end/7245: ICE in find_reloads
Date: Tue, 9 Jul 2002 21:47:36 +0200 (CEST)
Again for the bugtracking system. Manually constructed answer mail ;(
> (insn:QI 61 60 11 (parallel[
> (set (reg:CCZ 17 flags)
> (compare:CCZ (ashiftrt:SI (reg/v:SI 0 eax [62])
> (const_int -8 [0xfffffff8]))
> (const_int 0 [0x0])))
> (set (reg/v:SI 1 edx [60])
> (ashiftrt:SI (reg/v:SI 0 eax [62])
> (const_int -8 [0xfffffff8])))
> ] ) 434 {*ashrsi3_cmp} (nil)
The problem is, that this insn doesn't fulfill it's constraint on operand
2, which is the -8. It needs to be an immediate_operand() (which it is),
with constraint "I", which means >=0 and <= 31, which it isn't.
Constraints are first checked in reload, so only there we see, that the
whole selection of the pattern shouldn't have happened. I.e. I think in
this case either the predicate immediate_operand is wrong, and shouldn't
accept values <0, or we need another letter constraint for a range
including some values <0.
I'm not sure anymore, what happens on x86, if the shift-count is negative
in the insn. It's ANDed with 31, right? In that case, we _might_ accept
negative values in the constraint.
The problem here is, that this operand can't be reloaded, so both, the
constraint and the predicate should really match.
Ciao,
Michael.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: middle-end/7245: ICE in find_reloads
@ 2002-07-09 12:43 paolo
0 siblings, 0 replies; 6+ messages in thread
From: paolo @ 2002-07-09 12:43 UTC (permalink / raw)
To: aj, gcc-bugs, gcc-prs, nobody, paolo, uli
Synopsis: ICE in find_reloads
Responsible-Changed-From-To: unassigned->paolo
Responsible-Changed-By: paolo
Responsible-Changed-When: Tue Jul 9 12:43:27 2002
Responsible-Changed-Why:
.
State-Changed-From-To: open->analyzed
State-Changed-By: paolo
State-Changed-When: Tue Jul 9 12:43:27 2002
State-Changed-Why:
Confirmed. Regression from GCC 2.95.3 -> high priority
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7245
^ permalink raw reply [flat|nested] 6+ messages in thread
* middle-end/7245: ICE in find_reloads
@ 2002-07-09 8:36 aj
0 siblings, 0 replies; 6+ messages in thread
From: aj @ 2002-07-09 8:36 UTC (permalink / raw)
To: gcc-gnats; +Cc: uli
>Number: 7245
>Category: middle-end
>Synopsis: ICE in find_reloads
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jul 09 08:36:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: aj@suse.de
>Release: GCC 3.1.1 CVS as of 2002-07-01
>Organization:
>Environment:
i686-linux-gnu with glibc 2.2.5
>Description:
typedef struct m {
int* c;
} m;
int mdph(m* s)
{
int v,j,r;
for(;;){
v = (r>>-8);
if(v==0) break;
s->c[j]= v;
}
}
generates an ICE:
$ /opt/gcc/3.1-devel/bin/gcc -c h.c -O2 -v
Reading specs from /opt/gcc/3.1-devel/lib/gcc-lib/i686-pc-linux-gnu/3.1.1/specs
Configured with: /cvs/gcc-3_1-branch/configure --prefix=/opt/gcc/3.1-devel --enable-shared --enable-threads=posix --enable-clocale=gnu --disable-nls --enable-languages=c,c++,f77,java,objc,ada --enable-checking=misc,tree,rtl,gc --with-system-zlib
Thread model: posix
gcc version 3.1.1 20020701 (prerelease)
/opt/gcc/3.1-devel/lib/gcc-lib/i686-pc-linux-gnu/3.1.1/cc1 -lang-c -v -D__GNUC__=3 -D__GNUC_MINOR__=1 -D__GNUC_PATCHLEVEL__=1 -D__ELF__ -Dunix -D__gnu_linux__ -Dlinux -D__ELF__ -D__unix__ -D__gnu_linux__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__OPTIMIZE__ -D__STDC_HOSTED__=1 -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ h.c -quiet -dumpbase h.c -O2 -version -o /tmp/cccOPrt7.s
GNU CPP version 3.1.1 20020701 (prerelease) (cpplib) (i386 Linux/ELF)
GNU C version 3.1.1 20020701 (prerelease) (i686-pc-linux-gnu)
compiled by GNU C version 3.1.1 20020701 (prerelease).
ignoring nonexistent directory "/opt/gcc/3.1-devel/i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/opt/gcc/3.1-devel/include
/opt/gcc/3.1-devel/lib/gcc-lib/i686-pc-linux-gnu/3.1.1/include
/usr/include
End of search list.
h.c: In function `mdph':
h.c:9: warning: right shift count is negative
h.c:13: unable to generate reloads for:
(insn:QI 61 60 11 (parallel[
(set (reg:CCZ 17 flags)
(compare:CCZ (ashiftrt:SI (reg/v:SI 0 eax [62])
(const_int -8 [0xfffffff8]))
(const_int 0 [0x0])))
(set (reg/v:SI 1 edx [60])
(ashiftrt:SI (reg/v:SI 0 eax [62])
(const_int -8 [0xfffffff8])))
] ) 434 {*ashrsi3_cmp} (nil)
(expr_list:REG_DEAD (reg/v:SI 0 eax [62])
(nil)))
h.c:13: Internal compiler error in find_reloads, at reload.c:3576
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
The same error occurs in both GCC 3.1.1 CVS and GCC 3.2 CVS.
This is a regression from GCC 2.95.3.
>How-To-Repeat:
Just compile the example code.
note that according to ISO C (6.5.7 clause #4):
The result of E1 >> E2 ...
If E1 has a signed type and a
negative value, the resulting value is
implementation-defined.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2002-09-29 16:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-09 12:46 middle-end/7245: ICE in find_reloads paolo
-- strict thread matches above, loose matches on Subject: below --
2002-09-29 9:40 sayle
2002-07-10 9:38 jakub
2002-07-09 12:56 Michael Matz
2002-07-09 12:43 paolo
2002-07-09 8:36 aj
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).