This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/43805] New: ICE when building Linux kernel 2.6.34-rc4


Host: x86_64, Ubuntu Linux 9.10
Target: lm32-elf
GCC 4.5.0
../configure --prefix=/opt/lm32 --target=lm32-elf --enable-languages=c,c++
--with-newlib --enable-sjlj-exceptions


As reported on the Milkymist mailing list, gcc-4.5.0 is unable to build the
Milkymist branch of the Linux kernel (http://github.com/tmatsuya/linux-2.6).
This manifests itself as an Internal Compiler Error when compiling
fs/timerfd.c:

make -f scripts/Makefile.build obj=fs/sysfs
  lm32-elf-gcc -Wp,-MD,fs/.timerfd.o.d  -nostdinc -isystem
/opt/lm32/lib/gcc/lm32-elf/4.5.0/include
-I/home/philpem/lm32/KERNELBUILD/linux-2.6/arch/lm32/include -Iinclude 
-include include/generated/autoconf.h -D__KERNEL__ -Wall -Wundef
-Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
-Werror-implicit-function-declaration -Wno-format-security
-fno-delete-null-pointer-checks -O2 -Wframe-larger-than=1024
-fno-stack-protector -fomit-frame-pointer -g -Wdeclaration-after-statement
-Wno-pointer-sign -fno-strict-overflow -fno-dwarf2-cfi-asm -fconserve-stack  
-D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(timerfd)" 
-D"KBUILD_MODNAME=KBUILD_STR(timerfd)"  -c -o fs/timerfd.o fs/timerfd.c
fs/timerfd.c: In function ?timerfd_poll?:
fs/timerfd.c:105:1: error: unrecognizable insn:
(insn 44 43 45 5 fs/timerfd.c:94 (set (reg:SI 68)
        (subreg:SI (mem/s:DI (plus:SI (reg/v/f:SI 39 [ ctx ])
                    (const_int 64 [0x40])) [0 S8 A64]) 4)) -1 (nil))
fs/timerfd.c:105:1: internal compiler error: in extract_insn, at recog.c:2103
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[1]: *** [fs/timerfd.o] Error 1
make: *** [fs] Error 2


And from the command line with "-v -save-temps":

philpem@cheetah:~/lm32/KERNELBUILD/linux-2.6$ lm32-elf-gcc -v -save-temps
-Wp,-MD,fs/.timerfd.o.d  -nostdinc -isystem
/opt/lm32/lib/gcc/lm32-elf/4.5.0/include
-I/home/philpem/lm32/KERNELBUILD/linux-2.6/arch/lm32/include -Iinclude 
-include include/generated/autoconf.h -D__KERNEL__ -Wall -Wundef
-Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
-Werror-implicit-function-declaration -Wno-format-security
-fno-delete-null-pointer-checks -O2 -Wframe-larger-than=1024
-fno-stack-protector -fomit-frame-pointer -g -Wdeclaration-after-statement
-Wno-pointer-sign -fno-strict-overflow -fno-dwarf2-cfi-asm -fconserve-stack  
-D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(timerfd)" 
-D"KBUILD_MODNAME=KBUILD_STR(timerfd)"  -save-temps -c -o fs/timerfd.o
fs/timerfd.c
Using built-in specs.
COLLECT_GCC=lm32-elf-gcc
COLLECT_LTO_WRAPPER=/opt/lm32/libexec/gcc/lm32-elf/4.5.0/lto-wrapper
Target: lm32-elf
Configured with: ../configure --prefix=/opt/lm32 --target=lm32-elf
--enable-languages=c,c++ --with-newlib --enable-sjlj-exceptions
Thread model: single
gcc version 4.5.0 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-nostdinc' '-isystem'
'/opt/lm32/lib/gcc/lm32-elf/4.5.0/include'
'-I/home/philpem/lm32/KERNELBUILD/linux-2.6/arch/lm32/include' '-Iinclude'
'-include' 'include/generated/autoconf.h' '-D__KERNEL__' '-Wall' '-Wundef'
'-Wstrict-prototypes' '-Wno-trigraphs' '-fno-strict-aliasing' '-fno-common'
'-Werror-implicit-function-declaration' '-Wno-format-security'
'-fno-delete-null-pointer-checks' '-O2' '-Wframe-larger-than=1024'
'-fno-stack-protector' '-fomit-frame-pointer' '-g'
'-Wdeclaration-after-statement' '-Wno-pointer-sign' '-fno-strict-overflow'
'-fno-dwarf2-cfi-asm' '-fconserve-stack' '-DKBUILD_STR(s)=#s'
'-DKBUILD_BASENAME=KBUILD_STR(timerfd)' '-DKBUILD_MODNAME=KBUILD_STR(timerfd)'
'-save-temps' '-c' '-o' 'fs/timerfd.o'
 /opt/lm32/libexec/gcc/lm32-elf/4.5.0/cc1 -E -quiet -nostdinc -v
-I/home/philpem/lm32/KERNELBUILD/linux-2.6/arch/lm32/include -Iinclude
-D__KERNEL__ -DKBUILD_STR(s)=#s -DKBUILD_BASENAME=KBUILD_STR(timerfd)
-DKBUILD_MODNAME=KBUILD_STR(timerfd) -isystem
/opt/lm32/lib/gcc/lm32-elf/4.5.0/include -include include/generated/autoconf.h
-MD fs/.timerfd.o.d fs/timerfd.c -Wall -Wundef -Wstrict-prototypes
-Wno-trigraphs -Werror-implicit-function-declaration -Wno-format-security
-Wframe-larger-than=1024 -Wdeclaration-after-statement -Wno-pointer-sign
-fno-strict-aliasing -fno-common -fno-delete-null-pointer-checks
-fno-stack-protector -fomit-frame-pointer -fno-strict-overflow
-fno-dwarf2-cfi-asm -fconserve-stack -g -fworking-directory -O2
-fpch-preprocess -o timerfd.i
#include "..." search starts here:
#include <...> search starts here:
 /home/philpem/lm32/KERNELBUILD/linux-2.6/arch/lm32/include
 include
 /opt/lm32/lib/gcc/lm32-elf/4.5.0/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-nostdinc' '-isystem'
'/opt/lm32/lib/gcc/lm32-elf/4.5.0/include'
'-I/home/philpem/lm32/KERNELBUILD/linux-2.6/arch/lm32/include' '-Iinclude'
'-include' 'include/generated/autoconf.h' '-D__KERNEL__' '-Wall' '-Wundef'
'-Wstrict-prototypes' '-Wno-trigraphs' '-fno-strict-aliasing' '-fno-common'
'-Werror-implicit-function-declaration' '-Wno-format-security'
'-fno-delete-null-pointer-checks' '-O2' '-Wframe-larger-than=1024'
'-fno-stack-protector' '-fomit-frame-pointer' '-g'
'-Wdeclaration-after-statement' '-Wno-pointer-sign' '-fno-strict-overflow'
'-fno-dwarf2-cfi-asm' '-fconserve-stack' '-DKBUILD_STR(s)=#s'
'-DKBUILD_BASENAME=KBUILD_STR(timerfd)' '-DKBUILD_MODNAME=KBUILD_STR(timerfd)'
'-save-temps' '-c' '-o' 'fs/timerfd.o'
 /opt/lm32/libexec/gcc/lm32-elf/4.5.0/cc1 -fpreprocessed timerfd.i -quiet
-dumpbase timerfd.c -auxbase-strip fs/timerfd.o -g -O2 -Wall -Wundef
-Wstrict-prototypes -Wno-trigraphs -Werror-implicit-function-declaration
-Wno-format-security -Wframe-larger-than=1024 -Wdeclaration-after-statement
-Wno-pointer-sign -version -fno-strict-aliasing -fno-common
-fno-delete-null-pointer-checks -fno-stack-protector -fomit-frame-pointer
-fno-strict-overflow -fno-dwarf2-cfi-asm -fconserve-stack -o timerfd.s
GNU C (GCC) version 4.5.0 (lm32-elf)
        compiled by GNU C version 4.4.1, GMP version 4.3.1, MPFR version
2.4.1-p2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C (GCC) version 4.5.0 (lm32-elf)
        compiled by GNU C version 4.4.1, GMP version 4.3.1, MPFR version
2.4.1-p2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 82b2fc76371f663ecc11fc912a8ee928
fs/timerfd.c: In function ?timerfd_poll?:
fs/timerfd.c:105:1: error: unrecognizable insn:
(insn 44 43 45 5 fs/timerfd.c:94 (set (reg:SI 68)
        (subreg:SI (mem/s:DI (plus:SI (reg/v/f:SI 39 [ ctx ])
                    (const_int 64 [0x40])) [0 S8 A64]) 4)) -1 (nil))
fs/timerfd.c:105:1: internal compiler error: in extract_insn, at recog.c:2103
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


This kernel compiles fine with gcc 3.4.0 and the lm32 patch which was published
on the GCC mailing list.

Removing "-O2" from the command line allows gcc to pass the ICE and compile
successfully.


-- 
           Summary: ICE when building Linux kernel 2.6.34-rc4
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: philpem at philpem dot me dot uk


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]