GCC-4.1.1-r1 for SH-4 dies with the following ICE during compilation of linux-2.6.19-rc2: CC drivers/mmc/mmc_block.o /mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/drivers/mmc/mmc_block.c: In function 'mmc_blk_issue_rq': /mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/drivers/mmc/mmc_block.c:395: error: unrecognizable insn: (insn 1116 732 738 31 (set (reg:SI 1 r1 [576]) (const_int 2147483972 [0x80000144])) -1 (nil) (nil)) /mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/drivers/mmc/mmc_block.c:395: internal compiler error: in extract_insn, at recog.c:2084 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugs.gentoo.org/> for instructions. Preprocessed source stored into /tmp/ccPmM39t.out file, please attach this to your bugreport. make[3]: *** [drivers/mmc/mmc_block.o] Error 1 make[2]: *** [drivers/mmc] Error 2 make[1]: *** [drivers] Error 2 make: *** [_all] Error 2 # sh4-unknown-linux-gnu-gcc -v Using built-in specs. Target: sh4-unknown-linux-gnu Configured with: /var/tmp/cross/sh4-unknown-linux-gnu/portage/cross-sh4-unknown-linux-gnu/gcc-4.1.1-r1/work/gcc-4.1.1/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/sh4-unknown-linux-gnu/gcc-bin/4.1.1 --includedir=/usr/lib/gcc/sh4-unknown-linux-gnu/4.1.1/include --datadir=/usr/share/gcc-data/sh4-unknown-linux-gnu/4.1.1 --mandir=/usr/share/gcc-data/sh4-unknown-linux-gnu/4.1.1/man --infodir=/usr/share/gcc-data/sh4-unknown-linux-gnu/4.1.1/info --with-gxx-include-dir=/usr/lib/gcc/sh4-unknown-linux-gnu/4.1.1/include/g++-v4 --host=i686-pc-linux-gnu --target=sh4-unknown-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --disable-nls --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --disable-multilib --disable-libmudflap --disable-libssp --disable-libgcj --enable-languages=c,c++ --with-sysroot=/usr/sh4-unknown-linux-gnu --enable-__cxa_atexit --enable-clocale=gnu Thread model: posix gcc version 4.1.1 (Gentoo 4.1.1-r1) 3.4.6 is good. I consider this bug very minor since gcc>=4 miscompiles sh-kernels anyway.
Created attachment 100507 [details] The preprocessed file which triggers the ICE
Created attachment 100509 [details] ice.i reduced test case
The fix by Kazumoto Kojima works fine, my test kernels boot and MMC interface is also okay. Can this patch please be added to the 4.1.1/4.1.2 gentoo patch-tarball?
it already has been queued ... it'll be released with gcc-4.1.2-r1