http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57455
Bug ID: 57455
Summary: "internal compiler error: Floating point exception",
in seemingly random places
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: theartlav at gmail dot com
Created attachment 30216
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30216&action=edit
Bug examples
System is Intel Atom CPU (eeepc 901 laptop), 32 bit LFS Linux, 3.9.3 kernel.
Tried GCC 4.8.0, compiled by itself, GCC 4.7.2 compiled with 4.8.0 and GCC
4.7.2 compiled by itself.
During compilation of several different projects, including GCC itself, the
compiler produces a "internal compiler error: Floating point exception" error.
This error can often be worked around by reshuffling the statements in the C
code being compiled (i.e. changing z=a/(b+c); to x=b+c; z=a/x;).
I thought it was a GCC 4.8.0 bug at first, so i compiled GCC 4.7.2, and tried
it, but am getting exactly the same errors.
Included are reproduction examples from compiling gcc 4.7.2 with itself, and
compiling Python 2.7.5 with gcc 4.7.2.
With 4.7.2 the errors happen in exactly the same way as with 4.8.0, but i no
longer have 4.8.0. If it's critical, i can build it again, and report from it.
GCC configuration options: configure --prefix=/usr --libexecdir=/usr/lib
--enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-clocale=gnu --enable-languages=c,c++ --disable-multilib
--with-system-zlib
Full output for cmathmodule.i (comes from Python 2.7.5):
gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O0 -Wall
-Wstrict-prototypes -I. -IInclude -I./Include -I/usr/include
-I/usr/local/include -I/mnt/sdc1/bld/Python-2.7.5/Include
-I/mnt/sdc1/bld/Python-2.7.5 -c
/mnt/sdc1/bld/Python-2.7.5/Modules/cmathmodule.c -o
build/temp.linux-i686-2.7/mnt/sdc1/bld/Python-2.7.5/Modules/cmathmodule.o
-save-temps -v
Using built-in specs.
COLLECT_GCC=gcc
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.7.2/configure --prefix=/usr --libexecdir=/usr/lib
--enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-clocale=gnu --enable-languages=c,c++ --disable-multilib
--with-system-zlib
Thread model: posix
gcc version 4.7.2 (GCC)
COLLECT_GCC_OPTIONS='-pthread' '-fPIC' '-fno-strict-aliasing' '-D' 'NDEBUG'
'-g' '-fwrapv' '-O0' '-Wall' '-Wstrict-prototypes' '-I' '.' '-I' 'Include' '-I'
'./Include' '-I' '/usr/include' '-I' '/usr/local/include' '-I'
'/mnt/sdc1/bld/Python-2.7.5/Include' '-I' '/mnt/sdc1/bld/Python-2.7.5' '-c'
'-o'
'build/temp.linux-i686-2.7/mnt/sdc1/bld/Python-2.7.5/Modules/cmathmodule.o'
'-save-temps' '-v' '-mtune=generic' '-march=pentiumpro'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/cc1 -E -quiet -v -I . -I Include -I
./Include -I /usr/include -I /usr/local/include -I
/mnt/sdc1/bld/Python-2.7.5/Include -I /mnt/sdc1/bld/Python-2.7.5 -D_REENTRANT
-D NDEBUG /mnt/sdc1/bld/Python-2.7.5/Modules/cmathmodule.c -mtune=generic
-march=pentiumpro -Wall -Wstrict-prototypes -fPIC -fno-strict-aliasing -fwrapv
-g -fworking-directory -O0 -fpch-preprocess -o cmathmodule.i
ignoring nonexistent directory
"/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../i686-pc-linux-gnu/include"
ignoring duplicate directory "./Include"
ignoring duplicate directory "/usr/include"
as it is a non-system directory that duplicates a system directory
ignoring duplicate directory "/usr/local/include"
as it is a non-system directory that duplicates a system directory
ignoring duplicate directory "/mnt/sdc1/bld/Python-2.7.5/Include"
ignoring duplicate directory "/mnt/sdc1/bld/Python-2.7.5"
#include "..." search starts here:
#include <...> search starts here:
.
Include
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/include
/usr/local/include
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/include-fixed
/usr/include
End of search list.
COLLECT_GCC_OPTIONS='-pthread' '-fPIC' '-fno-strict-aliasing' '-D' 'NDEBUG'
'-g' '-fwrapv' '-O0' '-Wall' '-Wstrict-prototypes' '-I' '.' '-I' 'Include' '-I'
'./Include' '-I' '/usr/include' '-I' '/usr/local/include' '-I'
'/mnt/sdc1/bld/Python-2.7.5/Include' '-I' '/mnt/sdc1/bld/Python-2.7.5' '-c'
'-o'
'build/temp.linux-i686-2.7