public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/17956] New: [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725
@ 2004-10-12 21:57 pinskia at gcc dot gnu dot org
2004-10-12 21:57 ` [Bug target/17956] " pinskia at gcc dot gnu dot org
` (15 more replies)
0 siblings, 16 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-12 21:57 UTC (permalink / raw)
To: gcc-bugs
This causes an Ada bootstrap, ../../xgcc -B../../ -c -g -O2 -W -Wall -gnatpg s-fore.adb -o s-fore.o
The trees look like:
natural___XDLU_0__2147483647 r;
long_long_float t;
<bb 0>:
t = MAX_EXPR <ABS_EXPR <lo>, ABS_EXPR <hi>>;
if (t >= 1.0e+1 == 0) goto <L11>; else goto <L12>;
<L11>:;
r = 2;
goto <bb 2> (<L2>);
<L12>:;
r = 2;
<L1>:;
t = t / 1.0e+1;
r = r + 1;
if (t >= 1.0e+1 == 0) goto <L2>; else goto <L1>;
<L2>:;
return r;
}
I cannot reproduce this with the C compiler as MAX_EXPR is not generated without -ffast-math.
The closest C code I could get is:
#include <math.h>
long double fabsl(long double);
long double Fore (long double lo, long double hi)
{
long double r;
long double t;
long double t1;
long double t2;
int tt;
//t = MAX_EXPR <ABS_EXPR <lo>, <hi>>;
t1 = fabsl(lo);
t2 = fabsl(hi);
t = t1 >= t2 ? t1 : t2;
tt = (t >= 1.0e+1L);
if (tt == 0) goto L12;
L11:;
r = 2;
goto L2;
L12:;
r = 2;
L1:;
t = t / 1.0e+1L;
r = r + 1;
tt = (t >= 1.0e+1L);
if (tt == 0) goto L1;
L2:;
return r;
}
--
Summary: [4.0 Regression] ICE in rs6000_emit_minmax,
config/rs6000/rs6000.c:11725
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code, build
Severity: normal
Priority: P2
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: powerpc-darwin
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17956
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/17956] [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725
2004-10-12 21:57 [Bug target/17956] New: [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725 pinskia at gcc dot gnu dot org
@ 2004-10-12 21:57 ` pinskia at gcc dot gnu dot org
2004-10-14 21:56 ` pinskia at gcc dot gnu dot org
` (14 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-12 21:57 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17956
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/17956] [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725
2004-10-12 21:57 [Bug target/17956] New: [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725 pinskia at gcc dot gnu dot org
2004-10-12 21:57 ` [Bug target/17956] " pinskia at gcc dot gnu dot org
@ 2004-10-14 21:56 ` pinskia at gcc dot gnu dot org
2004-10-24 16:23 ` pinskia at gcc dot gnu dot org
` (13 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-14 21:56 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-14 21:56 -------
Hmm, I think the problem is that the back-end did not expect MAX_EXPR to be outputted from a front-
end except when -ffast-math is added (I mean for floating point).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17956
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/17956] [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725
2004-10-12 21:57 [Bug target/17956] New: [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725 pinskia at gcc dot gnu dot org
2004-10-12 21:57 ` [Bug target/17956] " pinskia at gcc dot gnu dot org
2004-10-14 21:56 ` pinskia at gcc dot gnu dot org
@ 2004-10-24 16:23 ` pinskia at gcc dot gnu dot org
2004-10-24 16:23 ` pinskia at gcc dot gnu dot org
` (12 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-24 16:23 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-24 16:23 -------
*** Bug 18127 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |awreynolds at mac dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17956
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/17956] [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725
2004-10-12 21:57 [Bug target/17956] New: [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725 pinskia at gcc dot gnu dot org
` (2 preceding siblings ...)
2004-10-24 16:23 ` pinskia at gcc dot gnu dot org
@ 2004-10-24 16:23 ` pinskia at gcc dot gnu dot org
2004-10-26 10:18 ` micis at gmx dot de
` (11 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-24 16:23 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-24 16:23 -------
Confirmed via the dup bug.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-10-24 16:23:35
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17956
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/17956] [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725
2004-10-12 21:57 [Bug target/17956] New: [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725 pinskia at gcc dot gnu dot org
` (3 preceding siblings ...)
2004-10-24 16:23 ` pinskia at gcc dot gnu dot org
@ 2004-10-26 10:18 ` micis at gmx dot de
2004-10-26 11:57 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: micis at gmx dot de @ 2004-10-26 10:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From micis at gmx dot de 2004-10-26 10:17 -------
I also encountered this bug while compiling mysql-4.1.6-gamma with the actual
snapshot.
Reading specs from /usr/local/gcc40d/lib/gcc/powerpc-unknown-linux-
gnu/4.0.0/specs
Configured with: ../gcc40/configure --prefix=/usr/local/gcc40d --program-
suffix=40d --with-cpu=G5 --enable-altivec --enable-languages=c,c++ --enable-
checking
Thread model: posix
gcc version 4.0.0 20041024 (experimental)
sql_select.cc:2787: internal compiler error: in rs6000_emit_minmax, at
config/rs6000/rs6000.c:11805
Please submit a full bug report, with preprocessed source if appropriate.
Michael Cieslinski
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |micis at gmx dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17956
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/17956] [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725
2004-10-12 21:57 [Bug target/17956] New: [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725 pinskia at gcc dot gnu dot org
` (4 preceding siblings ...)
2004-10-26 10:18 ` micis at gmx dot de
@ 2004-10-26 11:57 ` pinskia at gcc dot gnu dot org
2004-10-27 2:20 ` pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-26 11:57 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-26 11:57 -------
Michael could you attach the preprocessed source, it might be the same bug or it might not. Also
having a C/C++ testcase would make this bug looked at more.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17956
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/17956] [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725
2004-10-12 21:57 [Bug target/17956] New: [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725 pinskia at gcc dot gnu dot org
` (5 preceding siblings ...)
2004-10-26 11:57 ` pinskia at gcc dot gnu dot org
@ 2004-10-27 2:20 ` pinskia at gcc dot gnu dot org
2004-10-27 4:10 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-27 2:20 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-27 02:19 -------
Hmm, yes we don't support MIN/MAX EXPR without -fno-trapping-math.
A rs6000 backend person should look at this.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17956
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/17956] [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725
2004-10-12 21:57 [Bug target/17956] New: [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725 pinskia at gcc dot gnu dot org
` (6 preceding siblings ...)
2004-10-27 2:20 ` pinskia at gcc dot gnu dot org
@ 2004-10-27 4:10 ` pinskia at gcc dot gnu dot org
2004-10-27 4:12 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-27 4:10 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-27 04:10 -------
Finnally found a C example:
Compile the folllowing with -O2 -ffast-math -ftrapping-math and you will get the failure.
#include <math.h>
int Fore (double lo, double hi)
{
int r;
double t;
double t1;
double t2;
int tt;
t1 = fabs(lo);
t2 = fabs(hi);
t = t1 >= t2 ? t1 : t2;
tt = (t >= 1.0e+1);
if (tt == 0) goto L12;
L11:;
r = 2;
goto L2;
L12:;
r = 2;
L1:;
t = t / 1.0e+1;
r = r + 1;
tt = (t >= 1.0e+1);
if (tt == 0) goto L1;
L2:;
return r;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17956
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/17956] [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725
2004-10-12 21:57 [Bug target/17956] New: [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725 pinskia at gcc dot gnu dot org
` (7 preceding siblings ...)
2004-10-27 4:10 ` pinskia at gcc dot gnu dot org
@ 2004-10-27 4:12 ` pinskia at gcc dot gnu dot org
2004-10-27 4:16 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-27 4:12 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-27 04:12 -------
This might also be a 3.4 regression I have not checked yet.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17956
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/17956] [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725
2004-10-12 21:57 [Bug target/17956] New: [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725 pinskia at gcc dot gnu dot org
` (8 preceding siblings ...)
2004-10-27 4:12 ` pinskia at gcc dot gnu dot org
@ 2004-10-27 4:16 ` pinskia at gcc dot gnu dot org
2004-10-27 4:20 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-27 4:16 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-27 04:16 -------
Nope only a 4.0 one.
--
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |4.0.0
Known to work| |3.4.0 3.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17956
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/17956] [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725
2004-10-12 21:57 [Bug target/17956] New: [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725 pinskia at gcc dot gnu dot org
` (9 preceding siblings ...)
2004-10-27 4:16 ` pinskia at gcc dot gnu dot org
@ 2004-10-27 4:20 ` pinskia at gcc dot gnu dot org
2004-10-27 4:54 ` dje at gcc dot gnu dot org
` (4 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-27 4:20 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-27 04:20 -------
Here is the reduced C code:
double Fore (double lo, double hi)
{
return lo>=hi?lo:hi;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17956
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/17956] [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725
2004-10-12 21:57 [Bug target/17956] New: [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725 pinskia at gcc dot gnu dot org
` (10 preceding siblings ...)
2004-10-27 4:20 ` pinskia at gcc dot gnu dot org
@ 2004-10-27 4:54 ` dje at gcc dot gnu dot org
2004-10-27 6:55 ` micis at gmx dot de
` (3 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: dje at gcc dot gnu dot org @ 2004-10-27 4:54 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dje at gcc dot gnu dot org 2004-10-27 04:54 -------
Created an attachment (id=7414)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7414&action=view)
rs6000.md patch
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |dje at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17956
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/17956] [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725
2004-10-12 21:57 [Bug target/17956] New: [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725 pinskia at gcc dot gnu dot org
` (11 preceding siblings ...)
2004-10-27 4:54 ` dje at gcc dot gnu dot org
@ 2004-10-27 6:55 ` micis at gmx dot de
2004-10-27 13:06 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: micis at gmx dot de @ 2004-10-27 6:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From micis at gmx dot de 2004-10-27 06:55 -------
Good and fast work!
I applied the patch and the ICE went away.
Michael Cieslinski
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17956
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/17956] [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725
2004-10-12 21:57 [Bug target/17956] New: [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725 pinskia at gcc dot gnu dot org
` (12 preceding siblings ...)
2004-10-27 6:55 ` micis at gmx dot de
@ 2004-10-27 13:06 ` pinskia at gcc dot gnu dot org
2004-10-27 20:19 ` cvs-commit at gcc dot gnu dot org
2004-10-28 3:59 ` pinskia at gcc dot gnu dot org
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-27 13:06 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-27 13:06 -------
Yes that fixes the Ada problem also. Thanks David.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17956
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/17956] [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725
2004-10-12 21:57 [Bug target/17956] New: [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725 pinskia at gcc dot gnu dot org
` (13 preceding siblings ...)
2004-10-27 13:06 ` pinskia at gcc dot gnu dot org
@ 2004-10-27 20:19 ` cvs-commit at gcc dot gnu dot org
2004-10-28 3:59 ` pinskia at gcc dot gnu dot org
15 siblings, 0 replies; 17+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-10-27 20:19 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-10-27 20:19 -------
Subject: Bug 17956
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: dje@gcc.gnu.org 2004-10-27 20:18:46
Modified files:
gcc : ChangeLog
gcc/config/rs6000: rs6000.md
Log message:
PR target/17956
* config/rs6000/rs6000.md (maxsf3): Add !flag_trapping_math to
final condition.
(minsf3): Same.
(maxdf3): Same.
(mindf3): Same.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.6051&r2=2.6052
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.md.diff?cvsroot=gcc&r1=1.326&r2=1.327
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17956
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/17956] [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725
2004-10-12 21:57 [Bug target/17956] New: [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725 pinskia at gcc dot gnu dot org
` (14 preceding siblings ...)
2004-10-27 20:19 ` cvs-commit at gcc dot gnu dot org
@ 2004-10-28 3:59 ` pinskia at gcc dot gnu dot org
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-28 3:59 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-28 03:59 -------
Fixed, note Ada still does not build but the first issue is a known one with a patch.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17956
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2004-10-28 3:59 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-12 21:57 [Bug target/17956] New: [4.0 Regression] ICE in rs6000_emit_minmax, config/rs6000/rs6000.c:11725 pinskia at gcc dot gnu dot org
2004-10-12 21:57 ` [Bug target/17956] " pinskia at gcc dot gnu dot org
2004-10-14 21:56 ` pinskia at gcc dot gnu dot org
2004-10-24 16:23 ` pinskia at gcc dot gnu dot org
2004-10-24 16:23 ` pinskia at gcc dot gnu dot org
2004-10-26 10:18 ` micis at gmx dot de
2004-10-26 11:57 ` pinskia at gcc dot gnu dot org
2004-10-27 2:20 ` pinskia at gcc dot gnu dot org
2004-10-27 4:10 ` pinskia at gcc dot gnu dot org
2004-10-27 4:12 ` pinskia at gcc dot gnu dot org
2004-10-27 4:16 ` pinskia at gcc dot gnu dot org
2004-10-27 4:20 ` pinskia at gcc dot gnu dot org
2004-10-27 4:54 ` dje at gcc dot gnu dot org
2004-10-27 6:55 ` micis at gmx dot de
2004-10-27 13:06 ` pinskia at gcc dot gnu dot org
2004-10-27 20:19 ` cvs-commit at gcc dot gnu dot org
2004-10-28 3:59 ` pinskia at gcc dot gnu dot org
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).