https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63752
Bug ID: 63752 Summary: avr ICE at reload1.c:2128 building newlib Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: joel at gcc dot gnu.org Created attachment 33895 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33895&action=edit Preprocessed newlib/libc/stdlib/mprec.c which generates the ICE xgcc (GCC) 5.0.0 20141104 (experimental) Bug triggered at -O2 and -0Os but not at -O0 or -O1. /users/joel/test-gcc/b-avr-rtems4.11-gcc/./gcc/xgcc -B/users/joel/test-gcc/b-avr-rtems4.11-gcc/./gcc/ -march=avr2 -O2 -c avr_bug.c /users/joel/test-gcc/b-avr-rtems4.11-gcc/./gcc/xgcc -B/users/joel/test-gcc/b-avr-rtems4.11-gcc/./gcc/ -nostdinc -B/users/joel/test-gcc/b-avr-rtems4.11-gcc/avr-rtems4.11/avr2/newlib/ -isystem /users/joel/test-gcc/b-avr-rtems4.11-gcc/avr-rtems4.11/avr2/newlib/targ-include -isystem /users/joel/test-gcc/gcc/newlib/libc/include -B/users/joel/test-gcc/install-head/avr-rtems4.11/bin/ -B/users/joel/test-gcc/install-head/avr-rtems4.11/lib/ -isystem /users/joel/test-gcc/install-head/avr-rtems4.11/include -isystem /users/joel/test-gcc/install-head/avr-rtems4.11/sys-include -march=avr2 -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"2.1.0\" -DPACKAGE_STRING=\"newlib\ 2.1.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I. -I../../../../../../gcc/newlib/libc/stdlib -Os -DPREFER_SIZE_OVER_SPEED -mcall-prologues -D_COMPILING_NEWLIB -DMALLOC_PROVIDED -DEXIT_PROVIDED -DSIGNAL_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_NANOSLEEP -DHAVE_BLKSIZE -DHAVE_FCNTL -DHAVE_ASSERT_FUNC -D_NO_GETLOGIN -D_NO_GETPWENT -D_NO_GETUT -D_NO_GETPASS -D_NO_SIGSET -D_NO_WORDEXP -D_NO_POPEN -D_NO_POSIX_SPAWN -fno-builtin -g -O2 -c -o lib_a-mprec.o `test -f 'mprec.c' || echo '../../../../../../gcc/newlib/libc/stdlib/'`mprec.c ../../../../../../gcc/newlib/libc/stdlib/mprec.c: In function '__multiply': ../../../../../../gcc/newlib/libc/stdlib/mprec.c:419:1: error: unable to find a register to spill in class 'POINTER_REGS' } ^ ../../../../../../gcc/newlib/libc/stdlib/mprec.c:419:1: error: this is the insn: (insn 86 85 88 16 (set (reg:SI 68 [ D.3699 ]) (mem:SI (post_inc:HI (reg:HI 16 r16 [orig:45 ivtmp.143 ] [45])) [16 MEM[base: _146, offset: 0B]+0 S4 A8])) ../../../../../../gcc/newlib/libc/stdlib/mprec.c:370 94 {*movsi} (expr_list:REG_INC (reg:HI 16 r16 [orig:45 ivtmp.143 ] [45]) (nil))) ../../../../../../gcc/newlib/libc/stdlib/mprec.c:419:1: internal compiler error: in spill_failure, at reload1.c:2128 0x87df63 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ../../gcc/gcc/rtl-error.c:110 0x87d7fd spill_failure ../../gcc/gcc/reload1.c:2128 0x87d7fd find_reload_regs ../../gcc/gcc/reload1.c:2054 0x87d7fd select_reload_regs ../../gcc/gcc/reload1.c:2074 0x87d7fd reload(rtx_insn*, int) ../../gcc/gcc/reload1.c:1043 0x776eb3 do_reload ../../gcc/gcc/ira.c:5392 0x776eb3 execute ../../gcc/gcc/ira.c:5542 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. make: *** [lib_a-mprec.o] Error 1