http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49104

           Summary: bootstrap failure on AMD K6-2 with illegal instruction
                    (cmove) in stage2
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: r...@gmx.de


I get the error in 4.6.0 and 4.6-20110520. 4.5.3 is fine.

$ ../gcc-4.6-20110520/configure --prefix=/usr/pkg/gcc-4.6 \
--enable-languages=c --disable-nls --disable-multilib --disable-lto \
--enable-checking=release --with-system-zlib

$ make bootstrap
...
Configuring stage 2 in i586-pc-linux-gnu/libgcc
configure: creating cache ./config.cache
checking for --enable-version-specific-runtime-libs... no
checking for a BSD-compatible install... /usr/bin/install -c
checking for gawk... gawk
checking build system type... i586-pc-linux-gnu
checking host system type... i586-pc-linux-gnu
checking for i586-pc-linux-gnu-ar... ar
checking for i586-pc-linux-gnu-lipo... lipo
checking for i586-pc-linux-gnu-nm... /home/rf11/src/build1/./gcc/nm
checking for i586-pc-linux-gnu-ranlib... ranlib
checking for i586-pc-linux-gnu-strip... strip
checking whether ln -s works... yes
checking for i586-pc-linux-gnu-gcc... /home/rf11/src/build1/./gcc/xgcc
-B/home/rf11/src/build1/./gcc/ -B/usr/pkg/gcc-4.6/i586-pc-linux-gnu/bin/
-B/usr/pkg/gcc-4.6/i586-pc-linux-gnu/lib/ -isystem
/usr/pkg/gcc-4.6/i586-pc-linux-gnu/include -isystem
/usr/pkg/gcc-4.6/i586-pc-linux-gnu/sys-include
checking for suffix of object files... configure: error: in
`/home/rf11/src/build1/i586-pc-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[2]: *** [configure-stage2-target-libgcc] Error 1
make[2]: Leaving directory `/home/rf11/src/build1'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/home/rf11/src/build1'
make: *** [bootstrap] Error 2

from ./i586-pc-linux-gnu/libgcc/config.log:
configure:3268: /home/rf11/src/build1/./gcc/xgcc -B/home/rf11/src/build1/./gcc/
-B/usr/pkg/gcc-4.6/i586-pc-linux-gnu/bin/
-B/usr/pkg/gcc-4.6/i586-pc-linux-gnu/lib/ -isystem
/usr/pkg/gcc-4.6/i586-pc-linux-gnu/include -isystem
/usr/pkg/gcc-4.6/i586-pc-linux-gnu/sys-include    -c -g -O2  conftest.c >&5
xgcc: internal compiler error: Illegal instruction (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
configure:3272: $? = 4
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL "http://www.gnu.org/software/libgcc/";
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:3286: error: in `/home/rf11/src/build1/i586-pc-linux-gnu/libgcc':
configure:3289: error: cannot compute suffix of object files: cannot compile


The illegal insn is at the end of init_vectorized_lexer() in cc1:

Program received signal SIGILL, Illegal instruction.
0x086f977c in init_vectorized_lexer ()
(gdb) disas init_vectorized_lexer
...
0x086f9745 <init_vectorized_lexer+101>: cpuid
0x086f9747 <init_vectorized_lexer+103>: test   %eax,%eax
0x086f9749 <init_vectorized_lexer+105>: je     0x86f96fa
<init_vectorized_lexer+26>
0x086f974b <init_vectorized_lexer+107>: mov    $0x1,%eax
0x086f9750 <init_vectorized_lexer+112>: mov    $0x86f65b0,%esi
0x086f9755 <init_vectorized_lexer+117>: cpuid  
0x086f9757 <init_vectorized_lexer+119>: and    $0x100000,%ecx
0x086f975d <init_vectorized_lexer+125>: jne    0x86f973a
<init_vectorized_lexer+90>
0x086f975f <init_vectorized_lexer+127>: mov    $0x86f6530,%esi
0x086f9764 <init_vectorized_lexer+132>: test   $0x4000000,%edx
0x086f976a <init_vectorized_lexer+138>: jne    0x86f973a
<init_vectorized_lexer+90>
0x086f976c <init_vectorized_lexer+140>: mov    $0x86f64c0,%esi
0x086f9771 <init_vectorized_lexer+145>: mov    $0x86f6060,%eax
0x086f9776 <init_vectorized_lexer+150>: and    $0x2000000,%edx
0x086f977c <init_vectorized_lexer+156>: cmove  %eax,%esi
0x086f977f <init_vectorized_lexer+159>: jmp    0x86f973a
<init_vectorized_lexer+90>

$ cat /proc/cpuinfo
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 5
model           : 8
model name      : AMD-K6(tm) 3D processor
stepping        : 12
cpu MHz         : 400.922
cache size      : 64 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr cx8 pge mmx syscall 3dnow k6_mtrr
bogomips        : 801.84
clflush size    : 32
cache_alignment : 32
address sizes   : 32 bits physical, 32 bits virtual


  Reinhard

Reply via email to