After the proposed fix to bug 67049, I see the following when building newlib-2.2.0.20150623 for sh64-elf with gcc-5.2.0: sh64-elf-gcc -B/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/newlib/ -isystem /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/newlib/targ-include -isystem /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libc/include -B/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/libgloss/sh64 -L/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/libgloss/libnosys -L/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/libgloss/sh64 -m5-compact-nofpu -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"2.2.0\" -DPACKAGE_STRING=\"newlib\ 2.2.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I. -I/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libc/stdlib -fno-builtin -g -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build=/usr/src/debug/cross-newlib-2.2.0.20150623-1 -fdebug-prefix-map=/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623=/usr/src/debug/cross-newlib-2.2.0.20150623-1 -m5-compact-nofpu -c -o lib_a-strtod.o `test -f 'strtod.c' || echo '/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libc/stdlib/'`strtod.c /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libc/stdlib/strtod.c: In function ‘strtof’: /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libc/stdlib/strtod.c:1272:1: internal compiler error: in sh_find_set_of_reg, at config/sh/sh-protos.h:235 } ^ Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Makefile:874: recipe for target 'lib_a-strtod.o' failed make[8]: *** [lib_a-strtod.o] Error 1 sh64-elf-gcc -B/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/newlib/ -isystem /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/newlib/targ-include -isystem /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libc/include -B/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/libgloss/sh64 -L/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/libgloss/libnosys -L/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/libgloss/sh64 -m5-compact-nofpu -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"2.2.0\" -DPACKAGE_STRING=\"newlib\ 2.2.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I. -I/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libc/stdlib -fno-builtin -g -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build=/usr/src/debug/cross-newlib-2.2.0.20150623-1 -fdebug-prefix-map=/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623=/usr/src/debug/cross-newlib-2.2.0.20150623-1 -m5-compact-nofpu -c -o lib_a-wcstod.o `test -f 'wcstod.c' || echo '/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libc/stdlib/'`wcstod.c /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libc/stdlib/wcstod.c: In function ‘_wcstof_r’: /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libc/stdlib/wcstod.c:210:1: internal compiler error: in sh_find_set_of_reg, at config/sh/sh-protos.h:235 } ^ Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Makefile:898: recipe for target 'lib_a-wcstod.o' failed sh64-elf-gcc -B/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/newlib/ -isystem /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/newlib/targ-include -isystem /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libc/include -B/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/libgloss/sh64 -L/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/libgloss/libnosys -L/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/libgloss/sh64 -m5-compact-nofpu -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"2.2.0\" -DPACKAGE_STRING=\"newlib\ 2.2.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I. -I/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/math -I/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/math/../common -fno-builtin -g -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build=/usr/src/debug/cross-newlib-2.2.0.20150623-1 -fdebug-prefix-map=/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623=/usr/src/debug/cross-newlib-2.2.0.20150623-1 -m5-compact-nofpu -c -o lib_a-k_cos.o `test -f 'k_cos.c' || echo '/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/math/'`k_cos.c /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/math/k_cos.c: In function ‘__kernel_cos’: /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/math/k_cos.c:94:1: internal compiler error: in sh_find_set_of_reg, at config/sh/sh-protos.h:235 } ^ Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Makefile:484: recipe for target 'lib_a-k_cos.o' failed make[8]: *** [lib_a-k_cos.o] Error 1 sh64-elf-gcc -B/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/newlib/ -isystem /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/newlib/targ-include -isystem /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libc/include -B/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/libgloss/sh64 -L/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/libgloss/libnosys -L/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/libgloss/sh64 -m5-compact-nofpu -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"2.2.0\" -DPACKAGE_STRING=\"newlib\ 2.2.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I. -I/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/math -I/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/math/../common -fno-builtin -g -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build=/usr/src/debug/cross-newlib-2.2.0.20150623-1 -fdebug-prefix-map=/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623=/usr/src/debug/cross-newlib-2.2.0.20150623-1 -m5-compact-nofpu -c -o lib_a-k_sin.o `test -f 'k_sin.c' || echo '/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/math/'`k_sin.c /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/math/k_sin.c: In function ‘__kernel_sin’: /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/math/k_sin.c:77:1: internal compiler error: in sh_find_set_of_reg, at config/sh/sh-protos.h:235 } ^ Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Makefile:490: recipe for target 'lib_a-k_sin.o' failed make[8]: *** [lib_a-k_sin.o] Error 1 sh64-elf-gcc -B/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/newlib/ -isystem /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/newlib/targ-include -isystem /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libc/include -B/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/libgloss/sh64 -L/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/libgloss/libnosys -L/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/libgloss/sh64 -m5-compact-nofpu -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"2.2.0\" -DPACKAGE_STRING=\"newlib\ 2.2.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I. -I/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/math -I/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/math/../common -fno-builtin -g -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build=/usr/src/debug/cross-newlib-2.2.0.20150623-1 -fdebug-prefix-map=/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623=/usr/src/debug/cross-newlib-2.2.0.20150623-1 -m5-compact-nofpu -c -o lib_a-k_tan.o `test -f 'k_tan.c' || echo '/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/math/'`k_tan.c /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/math/k_tan.c: In function ‘__kernel_tan’: /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/math/k_tan.c:130:1: internal compiler error: in sh_find_set_of_reg, at config/sh/sh-protos.h:235 } ^ Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Makefile:496: recipe for target 'lib_a-k_tan.o' failed make[8]: *** [lib_a-k_tan.o] Error 1 sh64-elf-gcc -B/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/newlib/ -isystem /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/newlib/targ-include -isystem /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libc/include -B/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/libgloss/sh64 -L/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/libgloss/libnosys -L/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/libgloss/sh64 -m5-compact-nofpu -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"2.2.0\" -DPACKAGE_STRING=\"newlib\ 2.2.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I. -I/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/math -I/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/math/../common -fno-builtin -g -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build=/usr/src/debug/cross-newlib-2.2.0.20150623-1 -fdebug-prefix-map=/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623=/usr/src/debug/cross-newlib-2.2.0.20150623-1 -m5-compact-nofpu -c -o lib_a-er_lgamma.o `test -f 'er_lgamma.c' || echo '/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/math/'`er_lgamma.c /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/math/er_lgamma.c: In function ‘__ieee754_lgamma_r’: /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/math/er_lgamma.c:309:1: internal compiler error: in sh_find_set_of_reg, at config/sh/sh-protos.h:235 } ^ Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Makefile:580: recipe for target 'lib_a-er_lgamma.o' failed make[8]: *** [lib_a-er_lgamma.o] Error 1 sh64-elf-gcc -B/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/newlib/ -isystem /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/newlib/targ-include -isystem /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libc/include -B/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/libgloss/sh64 -L/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/libgloss/libnosys -L/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/libgloss/sh64 -m5-compact-nofpu -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"2.2.0\" -DPACKAGE_STRING=\"newlib\ 2.2.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I. -I/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/math -I/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/math/../common -fno-builtin -g -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build=/usr/src/debug/cross-newlib-2.2.0.20150623-1 -fdebug-prefix-map=/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623=/usr/src/debug/cross-newlib-2.2.0.20150623-1 -m5-compact-nofpu -c -o lib_a-e_scalb.o `test -f 'e_scalb.c' || echo '/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/math/'`e_scalb.c /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/math/e_scalb.c: In function ‘__ieee754_scalb’: /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/math/e_scalb.c:53:1: internal compiler error: in sh_find_set_of_reg, at config/sh/sh-protos.h:235 } ^ Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Makefile:616: recipe for target 'lib_a-e_scalb.o' failed make[8]: *** [lib_a-e_scalb.o] Error 1 sh64-elf-gcc -B/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/newlib/ -isystem /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/newlib/targ-include -isystem /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libc/include -B/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/libgloss/sh64 -L/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/libgloss/libnosys -L/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/libgloss/sh64 -m5-compact-nofpu -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"2.2.0\" -DPACKAGE_STRING=\"newlib\ 2.2.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I. -I/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/math -I/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/math/../common -fno-builtin -g -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build=/usr/src/debug/cross-newlib-2.2.0.20150623-1 -fdebug-prefix-map=/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623=/usr/src/debug/cross-newlib-2.2.0.20150623-1 -m5-compact-nofpu -c -o lib_a-s_ldexp.o `test -f 's_ldexp.c' || echo '/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/math/'`s_ldexp.c /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/math/s_ldexp.c: In function ‘ldexp’: /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/math/s_ldexp.c:79:1: internal compiler error: in sh_find_set_of_reg, at config/sh/sh-protos.h:235 } ^ Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Makefile:832: recipe for target 'lib_a-s_ldexp.o' failed make[8]: *** [lib_a-s_ldexp.o] Error 1 make[8]: Target 'all' not remade because of errors. make[8]: Leaving directory '/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/newlib/libm/math' Making all in common make[8]: Entering directory '/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/newlib/libm/common' sh64-elf-gcc -B/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/newlib/ -isystem /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/newlib/targ-include -isystem /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libc/include -B/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/libgloss/sh64 -L/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/libgloss/libnosys -L/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/libgloss/sh64 -m5-compact-nofpu -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"2.2.0\" -DPACKAGE_STRING=\"newlib\ 2.2.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I. -I/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/common -fno-builtin -g -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build=/usr/src/debug/cross-newlib-2.2.0.20150623-1 -fdebug-prefix-map=/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623=/usr/src/debug/cross-newlib-2.2.0.20150623-1 -m5-compact-nofpu -c -o lib_a-s_log1p.o `test -f 's_log1p.c' || echo '/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/common/'`s_log1p.c /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/common/s_log1p.c: In function ‘log1p’: /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/common/s_log1p.c:215:1: internal compiler error: in sh_find_set_of_reg, at config/sh/sh-protos.h:235 } ^ Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Makefile:541: recipe for target 'lib_a-s_log1p.o' failed make[8]: *** [lib_a-s_log1p.o] Error 1 sh64-elf-gcc -B/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/newlib/ -isystem /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/newlib/targ-include -isystem /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libc/include -B/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/libgloss/sh64 -L/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/libgloss/libnosys -L/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/libgloss/sh64 -m5-compact-nofpu -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"2.2.0\" -DPACKAGE_STRING=\"newlib\ 2.2.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I. -I/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/common -fno-builtin -g -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build=/usr/src/debug/cross-newlib-2.2.0.20150623-1 -fdebug-prefix-map=/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623=/usr/src/debug/cross-newlib-2.2.0.20150623-1 -m5-compact-nofpu -c -o lib_a-s_nextafter.o `test -f 's_nextafter.c' || echo '/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/common/'`s_nextafter.c /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/common/s_nextafter.c: In function ‘nextafter’: /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/common/s_nextafter.c:119:1: internal compiler error: in sh_find_set_of_reg, at config/sh/sh-protos.h:235 } ^ Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Makefile:553: recipe for target 'lib_a-s_nextafter.o' failed make[8]: *** [lib_a-s_nextafter.o] Error 1 sh64-elf-gcc -B/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/newlib/ -isystem /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/newlib/targ-include -isystem /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libc/include -B/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/libgloss/sh64 -L/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/libgloss/libnosys -L/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/libgloss/sh64 -m5-compact-nofpu -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"2.2.0\" -DPACKAGE_STRING=\"newlib\ 2.2.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I. -I/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/common -fno-builtin -g -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build=/usr/src/debug/cross-newlib-2.2.0.20150623-1 -fdebug-prefix-map=/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623=/usr/src/debug/cross-newlib-2.2.0.20150623-1 -m5-compact-nofpu -c -o lib_a-s_fmax.o `test -f 's_fmax.c' || echo '/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/common/'`s_fmax.c /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/common/s_fmax.c: In function ‘fmax’: /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/common/s_fmax.c:50:1: internal compiler error: in sh_find_set_of_reg, at config/sh/sh-protos.h:235 } ^ Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Makefile:607: recipe for target 'lib_a-s_fmax.o' failed make[8]: *** [lib_a-s_fmax.o] Error 1 sh64-elf-gcc -B/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/newlib/ -isystem /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/newlib/targ-include -isystem /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libc/include -B/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/libgloss/sh64 -L/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build/sh64-elf/sh64-elf/m5-compact-nofpu/libgloss/libnosys -L/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/libgloss/sh64 -m5-compact-nofpu -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"2.2.0\" -DPACKAGE_STRING=\"newlib\ 2.2.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I. -I/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/common -fno-builtin -g -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/build=/usr/src/debug/cross-newlib-2.2.0.20150623-1 -fdebug-prefix-map=/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623=/usr/src/debug/cross-newlib-2.2.0.20150623-1 -m5-compact-nofpu -c -o lib_a-s_fmin.o `test -f 's_fmin.c' || echo '/usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/common/'`s_fmin.c /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/common/s_fmin.c: In function ‘fmin’: /usr/src/ports/cross-newlib/cross-newlib-2.2.0.20150623-1.x86_64/src/newlib-2.2.0.20150623/newlib/libm/common/s_fmin.c:50:1: internal compiler error: in sh_find_set_of_reg, at config/sh/sh-protos.h:235 } ^ Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Makefile:613: recipe for target 'lib_a-s_fmin.o' failed
Hm .. for (result.insn = stepfunc (insn); result.insn != NULL_RTX; previnsn = result.insn, result.insn = stepfunc (result.insn)) that "previnsn = ... " in sh_find_set_of_reg looks broken. I wonder how/why it never showed up for normal SH targets (normal = non-SH64). I'll have a look at this.
(In reply to Oleg Endo from comment #1) > Hm .. > > for (result.insn = stepfunc (insn); result.insn != NULL_RTX; > previnsn = result.insn, result.insn = stepfunc (result.insn)) > > that "previnsn = ... " in sh_find_set_of_reg looks broken. I wonder how/why > it never showed up for normal SH targets (normal = non-SH64). I'll have a > look at this. SHCOMPACT target uses different ABI for the function calls. It looks that that makes sh_find_set_of_reg unhappy. k_cos.c case is here: ... (call_insn/i 29 28 30 3 (parallel [ (set (reg:SI 2 r2) (call (mem:SI (reg/f:SI 509) [0 S4 A32]) (const_int 0 [0]))) (const_int 1610612736 [0x60000000]) (use (reg:SI 0 r0)) (use (reg:SI 1 r1)) (use (reg:SI 154 fpscr0)) (clobber (reg:SI 146 pr)) ]) ...k_cos.c:78 323 {call_value_compact} (expr_list:REG_DEAD (reg:SI 154 fpscr0) (expr_list:REG_DEAD (reg:SI 1 r1) (expr_list:REG_DEAD (reg:SI 0 r0) (expr_list:REG_CALL_DECL (symbol_ref:SI ("__fixdfsi") [flags 0x41]) (expr_list:REG_EH_REGION (const_int -2147483648 [0xffffffff80000000]) (nil)))))) (expr_list (use (reg:SI 2 r2)) (expr_list (use (mem/c:DF (reg/f:SI 508) [1 S8 A64])) (nil)))) (note 30 29 31 3 NOTE_INSN_DELETED) (insn 31 30 32 3 (set (reg:SI 147 t) (eq:SI (reg:SI 2 r2) (const_int 0 [0]))) ...k_cos.c:78 12 {cmpeqsi_t} (expr_list:REG_DEAD (reg:SI 2 r2) (nil))) ... and the problem happens at the call of sh_find_set_of_reg Breakpoint 2, sh_find_extending_set_of_reg (reg=0xb7e95e24, curr_insn=curr_insn@entry=0xb7e99480) at /exp/ldroot/dodes/xsh64-elf-combined/combined/gcc/config/sh/sh.c:13925 13925 sh_find_set_of_reg (reg, curr_insn, prev_nonnote_insn_bb, true); where reg is r2 and curr_insn is the insn 31. sh_find_set_of_reg is stepping backward from the insn 31 but the call_insn 29 is missed. Does the patch below work? Oleg, it's the same one we've discussed, I think. Thought? diff --git a/config/sh/sh-protos.h b/config/sh/sh-protos.h index 5a552e2..3b725ba 100644 --- a/config/sh/sh-protos.h +++ b/config/sh/sh-protos.h @@ -198,7 +198,8 @@ sh_find_set_of_reg (rtx reg, rtx_insn* insn, F stepfunc, { if (BARRIER_P (result.insn)) break; - if (!NONJUMP_INSN_P (result.insn)) + if (!NONJUMP_INSN_P (result.insn) + && !(REGNO (reg) < FIRST_PSEUDO_REGISTER && CALL_P (result.insn))) continue; if (reg_set_p (reg, result.insn)) {
(In reply to Kazumoto Kojima from comment #2) > Does the patch below work? Yes, this patch in combination of that from bug 67049 allows me to complete the sh64-elf toolchain and does not break the sh-elf toolchain. Thank you for your assistance.
(In reply to Kazumoto Kojima from comment #2) > > where reg is r2 and curr_insn is the insn 31. sh_find_set_of_reg is > stepping backward from the insn 31 but the call_insn 29 is missed. > > Does the patch below work? > > Oleg, it's the same one we've discussed, I think. Thought? Same function, different problem, and all are true :) The previous issue was that sh_find_set_of_reg does not check if an insn clobbers the searched reg. Usually set_of will find a regular clobber in the insn. For calls that clobber some hardregs it doesn't work. This requires additional calls to 'modified_in_p'. This issue here is that it doesn't understand that the call_insn sets the searched reg. Your patch works for this particular case, but I think the better fix for this would be to just use INSN_P instead of NONJUMP_INSN_P. Then we don't need the REGNO check. I've planted the assert (which got us here) to catch inconsistencies of the return value. Even if sh_find_set_of_reg skips over the the call_insn because of the !NONJUMP_INSN_P, the return value should be consistent. So there is another problem. I'll work on a patch for that.
Created attachment 36331 [details] Proposed patch The issue with the function 'sh_find_set_of_reg' has also popped up when enabling LRA by default on trunk (see PR 55212). With the attached patch, sh-elf and sh64-elf newlib based toolchains build successfully. I'm now testing the patch on sh-elf.
(In reply to Oleg Endo from comment #5) > Created attachment 36331 [details] > Proposed patch > > The issue with the function 'sh_find_set_of_reg' has also popped up when > enabling LRA by default on trunk (see PR 55212). > > With the attached patch, sh-elf and sh64-elf newlib based toolchains build > successfully. I'm now testing the patch on sh-elf. No new failures for make -k check RUNTESTFLAGS="--target_board=sh-sim\{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}"
Author: olegendo Date: Mon Sep 14 13:46:14 2015 New Revision: 227750 URL: https://gcc.gnu.org/viewcvs?rev=227750&root=gcc&view=rev Log: gcc/ PR target/67061 * config/sh/sh-protos.h (sh_find_set_of_reg): Simplfiy for-loop. Handle call insns. Modified: trunk/gcc/ChangeLog trunk/gcc/config/sh/sh-protos.h
Author: olegendo Date: Sun Sep 20 10:18:45 2015 New Revision: 227943 URL: https://gcc.gnu.org/viewcvs?rev=227943&root=gcc&view=rev Log: gcc/ Backport from mainline 2015-09-14 Oleg Endo <olegendo@gcc.gnu.org> PR target/67061 * config/sh/sh-protos.h (sh_find_set_of_reg): Simplfiy for-loop. Handle call insns. Modified: branches/gcc-5-branch/gcc/ChangeLog branches/gcc-5-branch/gcc/config/sh/sh-protos.h
Fixed on trunk and GCC 5 branch.