This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c/9835: ICE - segfault using -msoft-float with latest mips-elf toolchain
- From: Fred Fish <fnf at public dot ninemoons dot com>
- To: gcc-bugs at gcc dot gnu dot org
- Cc: kazu at cs dot umass dot edu, fnf at intrinsity dot com
- Date: Tue, 25 Feb 2003 10:35:19 -0700 (MST)
- Subject: Re: c/9835: ICE - segfault using -msoft-float with latest mips-elf toolchain
- Reply-to: fnf at intrinsity dot com
The following code (simplified from my original reported testcase)
triggers an internal compiler error when compiled with -O2 and
-msoft-float by the latest mips-elf toolchain:
void
foo ()
{
double dval;
unsigned int ival;
if (dval == 0)
return;
if (dval != dval)
{
bar (ival);
}
if (dval < 0)
{
bar (ival);
}
}
For example:
$ ./cc1 -O2 -msoft-float segfault.i
foo
segfault.i: In function `foo':
segfault.i:17: internal compiler error: Segmentation fault
Comparing with a previously working compiler, I have backtracked the
problem to a recent change made to cprop_jump(). The following patch
that reverts one line of that change will sidestep the problem, but is
probably NOT the right fix. Unfortunately my knowledge of gcc
internals is not sufficient for me to provide a better patch at this
time.
Index: gcse.c
===================================================================
RCS file: /mips/newtools/fsf/gcc/gcc/gcse.c,v
retrieving revision 1.3
diff -u -p -r1.3 gcse.c
--- gcse.c 2003/02/24 15:40:41 1.3
+++ gcse.c 2003/02/25 17:29:28
@@ -4064,7 +4064,7 @@ cprop_jump (bb, setcc, jump, from, src)
new_set = simplify_replace_rtx (SET_SRC (set),
SET_DEST (setcc_set),
- setcc_set_src);
+ SET_SRC (setcc_set));
}
else
new_set = set;
-Fred