I found a bug of ICE in gcc-4.4.3 on sh-elf. 
gcc-4.3 and gcc-4.5 does not have this problem.

$ gcc -O2 mtest01-k-e.c
mtest01-k.c: In function emainf:
mtest01-k.c:88: error: could not split insn
(jump_insn 312 302 472 mtest01-k.c:64 (parallel [
            (set (pc)
                (if_then_else (leu (reg/v:DI 12 r12 [orig:310 maxbytes ] [310])
                        (const_int 1073741824 [0x40000000]))
                    (label_ref:SI 516)
                    (pc)))
            (clobber (reg:SI 10 r10))
            (clobber (reg:SI 147 t))
        ]) 6 {cbranchdi4_i} (expr_list:REG_BR_PRED (const_int 49 [0x31])
        (expr_list:REG_UNUSED (reg:SI 147 t)
            (expr_list:REG_UNUSED (reg:SI 10 r10)
                (expr_list:REG_BR_PROB (const_int 0 [0x0])
                    (nil))))))
mtest01-k.c:88: internal compiler error: in final_scan_insn, at final.c:2604
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.4/README.Bugs> for instructions.

When I don't optimize it, it doesn't become the error.

$ gcc-4.4 -v 
Using built-in specs.
Target: sh4-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.3-3'
--with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
--enable-multiarch --enable-linker-build-id --with-system-zlib
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc
--with-multilib-list=m4,m4-nofpu --with-cpu=sh4 --enable-checking=release
--build=sh4-linux-gnu --host=sh4-linux-gnu --target=sh4-linux-gnu
Thread model: posix
gcc version 4.4.3 (Debian 4.4.3-3)


-- 
           Summary: ICE : in final_scan_insn, at final.c:2604
           Product: gcc
           Version: 4.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: iwamatsu at nigauri dot org
 GCC build triplet: sh4-linux-gnu
  GCC host triplet: sh4-linux-gnu
GCC target triplet: sh4-linux-gnu


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

Reply via email to