[Bug fortran/40734] ICE on attempt to compile trivial Fortran program

al dot danial at ngc dot com gcc-bugzilla@gcc.gnu.org
Mon Jul 13 18:51:00 GMT 2009

------- Comment #6 from al dot danial at ngc dot com  2009-07-13 18:51 -------
(In reply to comment #5)
> My guess would be you have configured libgmp or libmpfr for a different CPU
> than you really have.  Try
> gdb --args /apps/gcc/4.4.0/libexec/gcc/i686-pc-linux-gnu/4.4.0/f951 hello.f
> run
> and see on which insn it crashed (disas $pc-32 $pc+32)?
> Another possibility is the binary got corrupted.

>  gdb --args /apps/gcc/4.4.0/libexec/gcc/i686-pc-linux-gnu/4.4.0/f951 hello.f
GNU gdb Red Hat Linux (
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db
library "/lib/tls/libthread_db.so.1".

(gdb) run
Starting program: /apps/gcc/4.4.0/libexec/gcc/i686-pc-linux-gnu/4.4.0/f951

Program received signal SIGILL, Illegal instruction.
0x009c0cb9 in __gmpn_submul_1 () from /apps/gmp/4.2.2/lib/libgmp.so.3

(gdb) where
#0  0x009c0cb9 in __gmpn_submul_1 () from /apps/gmp/4.2.2/lib/libgmp.so.3
#1  0x009cd5a2 in __gmpn_sb_divrem_mn () from /apps/gmp/4.2.2/lib/libgmp.so.3
#2  0x00000000 in ?? ()

(gdb) disas $pc-32 $pc+32
Dump of assembler code from 0x9c0c99 to 0x9c0cd9:
0x009c0c99 <__gmpn_submul_1+2>: leave
0x009c0c9a <__gmpn_submul_1+3>: mov    0x8(%esp),%eax
0x009c0c9e <__gmpn_submul_1+7>: pcmpeqd %mm0,%mm0
0x009c0ca1 <__gmpn_submul_1+10>:        movd   0x10(%esp),%mm7
0x009c0ca6 <__gmpn_submul_1+15>:        pcmpeqd %mm6,%mm6
0x009c0ca9 <__gmpn_submul_1+18>:        mov    0x4(%esp),%edx
0x009c0cad <__gmpn_submul_1+22>:        psrlq  $0x20,%mm0
0x009c0cb1 <__gmpn_submul_1+26>:        mov    0xc(%esp),%ecx
0x009c0cb5 <__gmpn_submul_1+30>:        psllq  $0x20,%mm6
0x009c0cb9 <__gmpn_submul_1+34>:        psubq  %mm0,%mm6
0x009c0cbc <__gmpn_submul_1+37>:        psubq  %mm1,%mm0
0x009c0cbf <__gmpn_submul_1+40>:        movd   (%eax),%mm1
0x009c0cc2 <__gmpn_submul_1+43>:        lea    0x4(%eax),%eax
0x009c0cc5 <__gmpn_submul_1+46>:        movd   (%edx),%mm2
0x009c0cc8 <__gmpn_submul_1+49>:        paddq  %mm6,%mm2
0x009c0ccb <__gmpn_submul_1+52>:        pmuludq %mm7,%mm1
0x009c0cce <__gmpn_submul_1+55>:        psubq  %mm1,%mm2
0x009c0cd1 <__gmpn_submul_1+58>:        paddq  %mm2,%mm0
0x009c0cd4 <__gmpn_submul_1+61>:        sub    $0x1,%ecx
0x009c0cd7 <__gmpn_submul_1+64>:        movd   %mm0,(%edx)
End of assembler dump.

yeah, something with GMP.  I'll rebuild it, then rebuild GCC 4.4.0, report what



More information about the Gcc-bugs mailing list