public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/43805] New: ICE when building Linux kernel 2.6.34-rc4
@ 2010-04-19 20:26 philpem at philpem dot me dot uk
2010-04-19 20:27 ` [Bug c/43805] " philpem at philpem dot me dot uk
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: philpem at philpem dot me dot uk @ 2010-04-19 20:26 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 7394 bytes --]
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/43805] ICE when building Linux kernel 2.6.34-rc4
2010-04-19 20:26 [Bug c/43805] New: ICE when building Linux kernel 2.6.34-rc4 philpem at philpem dot me dot uk
@ 2010-04-19 20:27 ` philpem at philpem dot me dot uk
2010-04-19 20:33 ` [Bug target/43805] " philpem at philpem dot me dot uk
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: philpem at philpem dot me dot uk @ 2010-04-19 20:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from philpem at philpem dot me dot uk 2010-04-19 20:27 -------
Created an attachment (id=20426)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20426&action=view)
timerfd intermediate file
.i file, requested per bug reporting guidelines
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43805
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/43805] ICE when building Linux kernel 2.6.34-rc4
2010-04-19 20:26 [Bug c/43805] New: ICE when building Linux kernel 2.6.34-rc4 philpem at philpem dot me dot uk
2010-04-19 20:27 ` [Bug c/43805] " philpem at philpem dot me dot uk
@ 2010-04-19 20:33 ` philpem at philpem dot me dot uk
2010-04-19 21:39 ` steven at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: philpem at philpem dot me dot uk @ 2010-04-19 20:33 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 743 bytes --]
------- Comment #2 from philpem at philpem dot me dot uk 2010-04-19 20:33 -------
Admittedly removing -O2 does fix the ICE in this file, however a different
source file (mm/filemap.c) causes a gcc ICE when it isn't built with -O2:
mm/filemap.c: In function do_generic_file_read:
mm/filemap.c:1171:1: error: unrecognizable insn:
(insn 402 401 403 20 mm/filemap.c:1029 (set (reg:SI 389)
(subreg:SI (mem/c/i:DI (plus:SI (reg/f:SI 33 virtual-stack-vars)
(const_int -52 [0xffffffffffffffcc])) [0 isize+0 S8 A64])
4)) -1 (nil))
mm/filemap.c:1171:1: internal compiler error: in extract_insn, at recog.c:2103
So removing -O2 is *not* a viable workaround.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43805
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/43805] ICE when building Linux kernel 2.6.34-rc4
2010-04-19 20:26 [Bug c/43805] New: ICE when building Linux kernel 2.6.34-rc4 philpem at philpem dot me dot uk
2010-04-19 20:27 ` [Bug c/43805] " philpem at philpem dot me dot uk
2010-04-19 20:33 ` [Bug target/43805] " philpem at philpem dot me dot uk
@ 2010-04-19 21:39 ` steven at gcc dot gnu dot org
2010-04-22 21:28 ` philpem at philpem dot me dot uk
2010-05-26 9:15 ` jon at beniston dot com
4 siblings, 0 replies; 6+ messages in thread
From: steven at gcc dot gnu dot org @ 2010-04-19 21:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from steven at gcc dot gnu dot org 2010-04-19 21:39 -------
Removing -O2 is never a proper work-around anyway. This should just work.
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2010-04-19 21:39:30
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43805
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/43805] ICE when building Linux kernel 2.6.34-rc4
2010-04-19 20:26 [Bug c/43805] New: ICE when building Linux kernel 2.6.34-rc4 philpem at philpem dot me dot uk
` (2 preceding siblings ...)
2010-04-19 21:39 ` steven at gcc dot gnu dot org
@ 2010-04-22 21:28 ` philpem at philpem dot me dot uk
2010-05-26 9:15 ` jon at beniston dot com
4 siblings, 0 replies; 6+ messages in thread
From: philpem at philpem dot me dot uk @ 2010-04-22 21:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from philpem at philpem dot me dot uk 2010-04-22 21:28 -------
I've just bisected the source tree with "svn-bisect" -- starting at rev 154096
(the first rev with lm32 support), ending at 158339 (gcc 4.5.0 release).
Turns out the bug was introduced in or before 154096, which doesn't really help
a lot.... I know this code compiles with 4.4.0 thru 4.4.2 (patched), and it
definitely DOESN'T work on 4.5.0.
Guess there's more work to be done.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43805
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/43805] ICE when building Linux kernel 2.6.34-rc4
2010-04-19 20:26 [Bug c/43805] New: ICE when building Linux kernel 2.6.34-rc4 philpem at philpem dot me dot uk
` (3 preceding siblings ...)
2010-04-22 21:28 ` philpem at philpem dot me dot uk
@ 2010-05-26 9:15 ` jon at beniston dot com
4 siblings, 0 replies; 6+ messages in thread
From: jon at beniston dot com @ 2010-05-26 9:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jon at beniston dot com 2010-05-26 09:15 -------
Created an attachment (id=20746)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20746&action=view)
Possible fix for bug
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43805
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-05-26 9:15 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-19 20:26 [Bug c/43805] New: ICE when building Linux kernel 2.6.34-rc4 philpem at philpem dot me dot uk
2010-04-19 20:27 ` [Bug c/43805] " philpem at philpem dot me dot uk
2010-04-19 20:33 ` [Bug target/43805] " philpem at philpem dot me dot uk
2010-04-19 21:39 ` steven at gcc dot gnu dot org
2010-04-22 21:28 ` philpem at philpem dot me dot uk
2010-05-26 9:15 ` jon at beniston dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).