This is typical of the types of failures m32c got before IRA, too. I had a good build on Feb 19th, but if I try to reproduce it, it fails too.
Fails with -O2, works with -Os. Note: you might need -fno-ivopts to get around the recent m32c/IV problems. Any ideas? Any thoughts on why gcc has so many problems with this chip? d...@greed pts/9 ~/m32c/gcc/m32c-elf/m32c-elf/m32cm/libstdc++-v3/src $ make CXXFLAGS="-g -O2 -dap" wstring-inst.o /greed/dj/m32c/gcc/m32c-elf/./gcc/xgcc -shared-libgcc -B/greed/dj/m32c/gcc/m32c-elf/./gcc -nostdinc++ -L/greed/dj/m32c/gcc/m32c-elf/m32c-elf/m32cm/libstdc++-v3/src -L/greed/dj/m32c/gcc/m32c-elf/m32c-elf/m32cm/libstdc++-v3/src/.libs -B/greed/dj/m32c/install/m32c-elf/bin/ -B/greed/dj/m32c/install/m32c-elf/lib/ -isystem /greed/dj/m32c/install/m32c-elf/include -isystem /greed/dj/m32c/install/m32c-elf/sys-include -mcpu=m32cm -DHAVE_CONFIG_H -I. -I../../../../../gcc/libstdc++-v3/src -I.. -I/greed/dj/m32c/gcc/m32c-elf/m32c-elf/m32cm/libstdc++-v3/include/m32c-elf -I/greed/dj/m32c/gcc/m32c-elf/m32c-elf/m32cm/libstdc++-v3/include -I/greed/dj/m32c/gcc/gcc/libstdc++-v3/libsupc++ -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -g -O2 -dap -std=gnu++0x -c ../../../../../gcc/libstdc++-v3/src/wstring-inst.cc In file included from /greed/dj/m32c/gcc/m32c-elf/m32c-elf/m32cm/libstdc++-v3/include/string:53, from ../../../../../gcc/libstdc++-v3/src/string-inst.cc:33, from ../../../../../gcc/libstdc++-v3/src/wstring-inst.cc:34: /greed/dj/m32c/gcc/m32c-elf/m32c-elf/m32cm/libstdc++-v3/include/bits/basic_string.h: In member function 'std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::assign(std::initializer_list<_CharT>) [with _CharT = wchar_t, _Traits = std::char_traits<wchar_t>, _Alloc = std::allocator<wchar_t>]': /greed/dj/m32c/gcc/m32c-elf/m32c-elf/m32cm/libstdc++-v3/include/bits/basic_string.h:1007: error: unable to find a register to spill in class 'A_REGS' /greed/dj/m32c/gcc/m32c-elf/m32c-elf/m32cm/libstdc++-v3/include/bits/basic_string.h:1007: error: this is the insn: (insn 18 17 19 2 /greed/dj/m32c/gcc/m32c-elf/m32c-elf/m32cm/libstdc++-v3/include/bits/basic_string.h:1475 (parallel [ (set (reg:HI 0 r0 [39]) (ashift:HI (mem/s:HI (plus:PSI (subreg:PSI (reg/f:SI 25 [ __i1$_M_current ]) 0) (const_int -6 [0xfffffffa])) [3 <variable>.D.12386._M_length+0 S2 A8]) (const_int 2 [0x2]))) (clobber (scratch:HI)) ]) 224 {ashlhi3_i} (nil)) /greed/dj/m32c/gcc/m32c-elf/m32c-elf/m32cm/libstdc++-v3/include/bits/basic_string.h:1007: internal compiler error: in spill_failure, at reload1.c:2094 [wstring-inst.cc.175r.ira] Spilling for insn 18. reload failure for reload 0 Reloads for insn # 18 Reload 0: reload_in (SI) = (reg/f:SI 25 [ __i1$_M_current ]) A_REGS, RELOAD_FOR_OTHER_ADDRESS (opnum = 0) reload_in_reg: (reg/f:SI 25 [ __i1$_M_current ]) Reload 1: reload_in (HI) = (mem/s:HI (plus:PSI (subreg:PSI (reg/f:SI 25 [ __i1$_M_current ]) 0) (const_int -6 [0xfffffffa])) [3 <variable>.D.12386._M_length+0 S2 A8]) reload_out (HI) = (reg:HI 0 r0 [39]) A_HI_MEM_REGS, RELOAD_OTHER (opnum = 0) reload_in_reg: (mem/s:HI (plus:PSI (subreg:PSI (reg/f:SI 25 [ __i1$_M_current ]) 0) (const_int -6 [0xfffffffa])) [3 <variable>.D.12386._M_length+0 S2 A8]) reload_out_reg: (reg:HI 0 r0 [39]) reload_reg_rtx: (reg:HI 0 r0 [39])