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

            Bug ID: 60111
           Summary: [SH] ICE compiling Newlib (4.8.2)
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: lsebald1 at umbc dot edu

Created attachment 32081
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32081&action=edit
Preprocessed source file exhibiting the ICE.

When building a cross-compiler from armv6l-unknown-linux-gnueabihf (A Raspberry
Pi running Raspbian) to sh-elf, I'm running into an internal compiler error
when compiling part of Newlib. Here is the backtrace that is generated:

sh-elf-gcc
-B/mnt/usbhdd1/toolchain/kos/utils/dc-chain/build-newlib-sh-elf-2.0.0/sh-elf/m4-nofpu/newlib/
-isystem
/mnt/usbhdd1/toolchain/kos/utils/dc-chain/build-newlib-sh-elf-2.0.0/sh-elf/m4-nofpu/newlib/targ-include
-isystem
/mnt/usbhdd1/toolchain/kos/utils/dc-chain/newlib-2.0.0/newlib/libc/include
-B/mnt/usbhdd1/toolchain/kos/utils/dc-chain/build-newlib-sh-elf-2.0.0/sh-elf/m4-nofpu/libgloss/sh
-L/mnt/usbhdd1/toolchain/kos/utils/dc-chain/build-newlib-sh-elf-2.0.0/sh-elf/m4-nofpu/libgloss/libnosys
-L/mnt/usbhdd1/toolchain/kos/utils/dc-chain/newlib-2.0.0/libgloss/sh  -m4-nofpu
-DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\"
-DPACKAGE_VERSION=\"2.0.0\" -DPACKAGE_STRING=\"newlib\ 2.0.0\"
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I.
-I../../../../../../newlib-2.0.0/newlib/libc/stdlib
-DREENTRANT_SYSCALLS_PROVIDED -DMALLOC_PROVIDED -DABORT_PROVIDED -DHAVE_FCNTL
-ffunction-sections -fdata-sections -fno-builtin      -g -O2  -m4-nofpu -c -o
lib_a-lrand48.o `test -f 'lrand48.c' || echo
'../../../../../../newlib-2.0.0/newlib/libc/stdlib/'`lrand48.c
../../../../../../newlib-2.0.0/newlib/libc/stdlib/lrand48.c: In function
‘_lrand48_r’:
../../../../../../newlib-2.0.0/newlib/libc/stdlib/lrand48.c:24:1: internal
compiler error: in gen_ashift, at config/sh/sh.c:3746
 }
 ^
0x5a33db gen_ashift
    ../../gcc-4.8.2/gcc/config/sh/sh.c:3746
0x5a358f gen_shifty_hi_op(int, rtx_def**)
    ../../gcc-4.8.2/gcc/config/sh/sh.c:3874
0x5a87ff gen_shl_and(rtx_def*, rtx_def*, rtx_def*, rtx_def*)
    ../../gcc-4.8.2/gcc/config/sh/sh.c:4185
0x5f105f gen_split_912(rtx_def*, rtx_def**)
    ../../gcc-4.8.2/gcc/config/sh/sh.md:5173
0x222a6f try_split(rtx_def*, rtx_def*, int)
    ../../gcc-4.8.2/gcc/emit-rtl.c:3562
0x382b47 split_insn
    ../../gcc-4.8.2/gcc/recog.c:2836
0x38709f split_all_insns()
    ../../gcc-4.8.2/gcc/recog.c:2926
0x38715b rest_of_handle_split_after_reload
    ../../gcc-4.8.2/gcc/recog.c:3832
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

I have tried with both GCC versions available on the host OS' package manager
(Debian 4.6.3-14+rpi1, and Debian 4.7.2-5+rpi1) and have the same ICE with both
of them. This may actually be a host-related bug, rather than a target-related
bug, as the ICE does not occur when building a cross-compiler on Darwin on
x86-64.

Preprocessed source code of the file exhibiting the ICE is attached.

Reply via email to