FS#47372 - gcc, illegal instruction, mpfr

Attached to Project: Arch Linux
Opened by Benedikt (Drehstromlampe) - Monday, 14 December 2015, 18:14 GMT
Last edited by Allan McRae (Allan) - Tuesday, 15 December 2015, 01:30 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Allan McRae (Allan)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

My system is fully up to date.

When I try to compile a simple C-file, I get an illegal instruction error.
I'm not running any custom packages of gcc or anything. All compiling-related packages come from the standard arch-repo

compiler output:
//////////////////////////////////////////////////////////
$ gcc -v test.c
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/gcc/src/gcc-5.3.0/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --disable-multilib --disable-werror --enable-checking=release
Thread model: posix
gcc version 5.3.0 (GCC)
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=x86-64'
/usr/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/cc1 -quiet -v test.c -quiet -dumpbase test.c -mtune=generic -march=x86-64 -auxbase test -version -o /tmp/ccgfERik.s
GNU C11 (GCC) version 5.3.0 (x86_64-unknown-linux-gnu)
compiled by GNU C version 5.3.0, GMP version 6.1.0, MPFR version 3.1.3-p5, MPC version 1.0.3
warning: MPFR header version 3.1.3-p5 differs from library version 3.1.3-p4.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/include
/usr/local/include
/usr/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/include-fixed
/usr/include
End of search list.
GNU C11 (GCC) version 5.3.0 (x86_64-unknown-linux-gnu)
compiled by GNU C version 5.3.0, GMP version 6.1.0, MPFR version 3.1.3-p5, MPC version 1.0.3
warning: MPFR header version 3.1.3-p5 differs from library version 3.1.3-p4.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 3e74344320b5d8d3525ab83027d24686
test.c: In function 'main':
test.c:4:3: internal compiler error: Illegal instruction
if ( red > 0.04045 )
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.
//////////////////////////////////////////////////////////

The C-file is attached. I realize that the file doesn't make any sense. However, as soon as there is a float in a function, the compiler quits with the mentioned error.

I updated the mpfr-library using a package from the testing-repo, so everything is version 3.1.3-p5. This made the warning of differing mpfr-lib versions go away, but the actual error stayed.
   test.c (0.1 KiB)
This task depends upon

Closed by  Allan McRae (Allan)
Tuesday, 15 December 2015, 01:30 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#47284 
Comment by Paul (endoplasmicreticulum) - Monday, 14 December 2015, 19:26 GMT
Try to run this command in shell:
"expr 4 \* 4"

If you get a coredump, use coredumpctl with gdb to disassemble the instruction which caused the error.

And what what cpu do you have ?
Comment by Benedikt (Drehstromlampe) - Monday, 14 December 2015, 20:08 GMT
oh ok. expr 4 \* 4 failed

intel pentium 3805

i'll take a look at the coredump later

EDIT:
intel pentium 3805U
Comment by Benedikt (Drehstromlampe) - Monday, 14 December 2015, 20:46 GMT
dump is attached
Comment by Allan McRae (Allan) - Monday, 14 December 2015, 22:12 GMT
My guess is that this is a duplicate of  FS#47284  - I'll fix that today.
Comment by Benedikt (Drehstromlampe) - Monday, 14 December 2015, 22:19 GMT
Looks a lot like it.
Thanks for the quick response, the help, and the fix.

Best Regards

Benedikt

Loading...