The C compiler crashes upon seeing the 'log1p()' function, as follows:
$ gcc-snap -ffast-math -c test-logsum.c
test-logsum.c: In function 'test':
test-logsum.c:6: error: unrecognizable insn:
(insn 9 8 10 1 (set (reg:XF 63)
(float_extend:XF (reg:XF 61))) -1 (nil)
(expr_list:REG_DEAD (reg:XF 61)
(nil)))
test-logsum.c:6: internal compiler error: in extract_insn, at recog.c:2020
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Here is the (short) test-case file:
----------------------
#include <math.h>
double test ()
{
return log1p(1.0);
}
----------------------
$ gcc-snap -v
Using built-in specs.
Configured with: ../src/configure -v --enable-languages=c,c++,java,objc,ada
--prefix=/usr/lib/gcc-snapshot --enable-shared --with-system-zlib --enable-nls
--enable-threads=posix --without-included-gettext --disable-werror
--enable-__cxa_atexit --enable-libstdcxx-allocator=mt --enable-clocale=gnu
--enable-libstdcxx-debug --enable-java-gc=boehm --enable-java-awt=gtk
i486-linux-gnu
Thread model: posix
gcc version 4.0.0 20041231 (experimental)
NOTES:
1. BTW, this is a Debian snapshot. (2004-12-31)
2. The bug also occurs with a previous package:
$ gcc-4.0 -v
Reading specs from /usr/lib/gcc/i486-linux/4.0.0/specs
Configured with: ../src/configure -v --enable-languages=c,c++,java,f95,objc,ada
--prefix=/usr --libexecdir=/usr/lib --enable-shared --with-system-zlib
--enable-nls --enable-threads=posix --without-included-gettext
--program-suffix=-4.0 --enable-__cxa_atexit --enable-libstdcxx-allocator=mt
--enable-clocale=gnu --enable-libstdcxx-debug --enable-java-gc=boehm
--enable-java-awt=gtk --enable-mpfr i486-linux
Thread model: posix
gcc version 4.0.0 20041205 (experimental) (Debian 4.0-0pre2)
3. I am *fairly* sure that the Debian version 4.0-0pre1 was in November and did
not have this problem.
4. The problem did not exist in HEAD in the beginning of October.
--
Summary: ICE compiling logp(x) with -ffast-math
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bredelin at ucla dot edu
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: i486-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19236