public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/10979] New: g++ ICEs on legal code in subst_stack_regs_pat() (reg-stack.c)
@ 2003-05-26 11:21 martin@mpa-garching.mpg.de
2003-05-26 11:54 ` [Bug c++/10979] " martin@mpa-garching.mpg.de
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: martin@mpa-garching.mpg.de @ 2003-05-26 11:21 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10979
Summary: g++ ICEs on legal code in subst_stack_regs_pat() (reg-
stack.c)
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: martin@mpa-garching.mpg.de
CC: gcc-bugs@gcc.gnu.org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
Consider he following code:
double atan2(double a,double b);
class vec3
{
public:
double x, y, z;
vec3 &operator*= (double fact);
double Length () const;
};
using namespace std;
void toAxisAngle (vec3 &axis, double &angle)
{
double c2=8;
axis.x=9; axis.y=7; axis.z=7;
double s2 = 0;
angle = atan2(s2,c2);
axis *= 1/s2;
}
Without optimization, the compilation succeeds, but when -O -ffast-math are
added the compiler crashes with the following output:
~/data/planck/LevelS/cxxmod>g++ -c -O -ffast-math -v bla.cc
Reading specs from /afs/mpa/data/martin/ugcc/lib/gcc-lib/i686-pc-linux-gnu/3.4/specs
Configured with: /scratch/gcc/configure --prefix=/afs/mpa/data/martin/ugcc
--enable-languages=c++ --enable-namespaces
Thread model: posix
gcc version 3.4 20030526 (experimental)
/afs/mpa/data/martin/ugcc/lib/gcc-lib/i686-pc-linux-gnu/3.4/cc1plus -quiet -v
-D_GNU_SOURCE bla.cc -quiet -dumpbase bla.cc -auxbase bla -O -version
-ffast-math -o /tmp/cc8c9jQa.s
ignoring nonexistent directory "/afs/mpa/data/martin/ugcc/i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/afs/mpa/data/martin/ugcc/include/c++/3.4
/afs/mpa/data/martin/ugcc/include/c++/3.4/i686-pc-linux-gnu
/afs/mpa/data/martin/ugcc/include/c++/3.4/backward
/usr/local/include
/afs/mpa/data/martin/ugcc/include
/afs/mpa/data/martin/ugcc/lib/gcc-lib/i686-pc-linux-gnu/3.4/include
/usr/include
End of search list.
GNU C++ version 3.4 20030526 (experimental) (i686-pc-linux-gnu)
compiled by GNU C version 3.4 20030526 (experimental).
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64489
bla.cc: In function `void toAxisAngle(vec3&, double&)':
bla.cc:22: internal compiler error: in subst_stack_regs_pat, at reg-stack.c:
1468
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/10979] g++ ICEs on legal code in subst_stack_regs_pat() (reg-stack.c)
2003-05-26 11:21 [Bug c++/10979] New: g++ ICEs on legal code in subst_stack_regs_pat() (reg-stack.c) martin@mpa-garching.mpg.de
@ 2003-05-26 11:54 ` martin@mpa-garching.mpg.de
2003-05-26 14:57 ` pinskia@physics.uc.edu
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: martin@mpa-garching.mpg.de @ 2003-05-26 11:54 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10979
------- Additional Comments From martin@mpa-garching.mpg.de 2003-05-26 11:02 -------
Created an attachment (id=4076)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4076&action=view)
a testcase to reproduce the bug
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/10979] g++ ICEs on legal code in subst_stack_regs_pat() (reg-stack.c)
2003-05-26 11:21 [Bug c++/10979] New: g++ ICEs on legal code in subst_stack_regs_pat() (reg-stack.c) martin@mpa-garching.mpg.de
2003-05-26 11:54 ` [Bug c++/10979] " martin@mpa-garching.mpg.de
@ 2003-05-26 14:57 ` pinskia@physics.uc.edu
2003-05-27 15:45 ` [Bug optimization/10979] [3.4 regression] g++ ICEs on legal code in subst_stack_regs_pat() (reg-stack.c), with -O -ffast-math bangerth@dealii.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia@physics.uc.edu @ 2003-05-26 14:57 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10979
pinskia@physics.uc.edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-05-26 14:47:53
date| |
------- Additional Comments From pinskia@physics.uc.edu 2003-05-26 14:47 -------
Yep this is a bug on the mainline (20030526).
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug optimization/10979] [3.4 regression] g++ ICEs on legal code in subst_stack_regs_pat() (reg-stack.c), with -O -ffast-math
2003-05-26 11:21 [Bug c++/10979] New: g++ ICEs on legal code in subst_stack_regs_pat() (reg-stack.c) martin@mpa-garching.mpg.de
2003-05-26 11:54 ` [Bug c++/10979] " martin@mpa-garching.mpg.de
2003-05-26 14:57 ` pinskia@physics.uc.edu
@ 2003-05-27 15:45 ` bangerth@dealii.org
2003-06-22 3:27 ` pinskia at physics dot uc dot edu
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: bangerth@dealii.org @ 2003-05-27 15:45 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10979
bangerth@dealii.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P2 |P1
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug optimization/10979] [3.4 regression] g++ ICEs on legal code in subst_stack_regs_pat() (reg-stack.c), with -O -ffast-math
2003-05-26 11:21 [Bug c++/10979] New: g++ ICEs on legal code in subst_stack_regs_pat() (reg-stack.c) martin@mpa-garching.mpg.de
` (2 preceding siblings ...)
2003-05-27 15:45 ` [Bug optimization/10979] [3.4 regression] g++ ICEs on legal code in subst_stack_regs_pat() (reg-stack.c), with -O -ffast-math bangerth@dealii.org
@ 2003-06-22 3:27 ` pinskia at physics dot uc dot edu
2003-06-23 2:22 ` [Bug target/10979] [3.4 regression] g++ ICEs in subst_stack_regs_pat with -O -ffast-math and atan2 pinskia at physics dot uc dot edu
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-06-22 3:27 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10979
pinskia at physics dot uc dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2003-05-26 14:47:53 |2003-06-22 03:27:10
date| |
------- Additional Comments From pinskia at physics dot uc dot edu 2003-06-22 03:27 -------
Still exists on the mainline (20030621).
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/10979] [3.4 regression] g++ ICEs in subst_stack_regs_pat with -O -ffast-math and atan2
2003-05-26 11:21 [Bug c++/10979] New: g++ ICEs on legal code in subst_stack_regs_pat() (reg-stack.c) martin@mpa-garching.mpg.de
` (3 preceding siblings ...)
2003-06-22 3:27 ` pinskia at physics dot uc dot edu
@ 2003-06-23 2:22 ` pinskia at physics dot uc dot edu
2003-07-07 13:44 ` [Bug target/10979] [3.4 regression] ICE " pinskia at physics dot uc dot edu
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-06-23 2:22 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10979
pinskia at physics dot uc dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|optimization |target
Last reconfirmed|2003-06-22 03:27:10 |2003-06-23 02:21:43
date| |
Summary|[3.4 regression] g++ ICEs on|[3.4 regression] g++ ICEs in
|legal code in |subst_stack_regs_pat with -O
|subst_stack_regs_pat() (reg-|-ffast-math and atan2
|stack.c), with -O -ffast- |
|math |
------- Additional Comments From pinskia at physics dot uc dot edu 2003-06-23 02:21 -------
This looks like it is caused by Roger Sayle <roger@eyesopen.com>'s patches to make
atan2 a builtin and a pattern for i386, he fixed log but it looks like atan2 is not fixed.
Here is a smaller example (also a C example):
void t(double);
double atan2(double,double);
void temp(double *c)
{
double c2 = 8;
double s2 = 0;
*c = atan2(s2,c2);
t(1/s2);
}
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/10979] [3.4 regression] ICE in subst_stack_regs_pat with -O -ffast-math and atan2
2003-05-26 11:21 [Bug c++/10979] New: g++ ICEs on legal code in subst_stack_regs_pat() (reg-stack.c) martin@mpa-garching.mpg.de
` (4 preceding siblings ...)
2003-06-23 2:22 ` [Bug target/10979] [3.4 regression] g++ ICEs in subst_stack_regs_pat with -O -ffast-math and atan2 pinskia at physics dot uc dot edu
@ 2003-07-07 13:44 ` pinskia at physics dot uc dot edu
2003-07-08 0:28 ` cvs-commit at gcc dot gnu dot org
2003-07-10 0:28 ` dhazeghi at yahoo dot com
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-07 13:44 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10979
------- Additional Comments From pinskia at physics dot uc dot edu 2003-07-07 13:44 -------
This regression was introduced between 2003-05-14-trunk (#203) and 2003-05-15-trunk
(#204). Found using Phil's regression hunter.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/10979] [3.4 regression] ICE in subst_stack_regs_pat with -O -ffast-math and atan2
2003-05-26 11:21 [Bug c++/10979] New: g++ ICEs on legal code in subst_stack_regs_pat() (reg-stack.c) martin@mpa-garching.mpg.de
` (5 preceding siblings ...)
2003-07-07 13:44 ` [Bug target/10979] [3.4 regression] ICE " pinskia at physics dot uc dot edu
@ 2003-07-08 0:28 ` cvs-commit at gcc dot gnu dot org
2003-07-10 0:28 ` dhazeghi at yahoo dot com
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-07-08 0:28 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10979
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-07-08 00:28 -------
Subject: Bug 10979
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: sayle@gcc.gnu.org 2003-07-08 00:28:47
Modified files:
gcc : ChangeLog
gcc/config/i386: i386.md
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.dg: 20030707-1.c
Log message:
PR target/10979
* config/i386/i386.md (atan2df3, atan2sf3, atan2xf3, atan2tf3):
Changed to define_expand patterns that copy operand[1] to prevent
it from being clobbered before emitting an atan2?f3_1 insn.
(atan2df3_1, atan2sf3_1, atan2xf_1, atan2tf3_1): New define_insn
patterns that actually specify the behaviour of x87's FPATAN.
* gcc.dg/20030707-1.c: New testcase.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.385&r2=2.386
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.md.diff?cvsroot=gcc&r1=1.474&r2=1.475
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2847&r2=1.2848
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/20030707-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/10979] [3.4 regression] ICE in subst_stack_regs_pat with -O -ffast-math and atan2
2003-05-26 11:21 [Bug c++/10979] New: g++ ICEs on legal code in subst_stack_regs_pat() (reg-stack.c) martin@mpa-garching.mpg.de
` (6 preceding siblings ...)
2003-07-08 0:28 ` cvs-commit at gcc dot gnu dot org
@ 2003-07-10 0:28 ` dhazeghi at yahoo dot com
7 siblings, 0 replies; 9+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-07-10 0:28 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10979
dhazeghi at yahoo dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From dhazeghi at yahoo dot com 2003-07-10 00:28 -------
Fixed by Roger's patch. Thanks!
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2003-07-10 0:28 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-26 11:21 [Bug c++/10979] New: g++ ICEs on legal code in subst_stack_regs_pat() (reg-stack.c) martin@mpa-garching.mpg.de
2003-05-26 11:54 ` [Bug c++/10979] " martin@mpa-garching.mpg.de
2003-05-26 14:57 ` pinskia@physics.uc.edu
2003-05-27 15:45 ` [Bug optimization/10979] [3.4 regression] g++ ICEs on legal code in subst_stack_regs_pat() (reg-stack.c), with -O -ffast-math bangerth@dealii.org
2003-06-22 3:27 ` pinskia at physics dot uc dot edu
2003-06-23 2:22 ` [Bug target/10979] [3.4 regression] g++ ICEs in subst_stack_regs_pat with -O -ffast-math and atan2 pinskia at physics dot uc dot edu
2003-07-07 13:44 ` [Bug target/10979] [3.4 regression] ICE " pinskia at physics dot uc dot edu
2003-07-08 0:28 ` cvs-commit at gcc dot gnu dot org
2003-07-10 0:28 ` dhazeghi at yahoo dot com
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).