From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 107909 invoked by alias); 13 Oct 2015 12:55:30 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 107835 invoked by uid 48); 13 Oct 2015 12:55:27 -0000 From: "matthijs at stdin dot nl" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/60040] AVR: error: unable to find a register to spill in class 'POINTER_REGS' Date: Tue, 13 Oct 2015 12:55:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Version: 4.8.3 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: matthijs at stdin dot nl X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-10/txt/msg00996.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60040 Matthijs Kooijman changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matthijs at stdin dot nl --- Comment #8 from Matthijs Kooijman --- Seems not - just tried with avr-gcc 5.1 and it is still broken: $ avr-gcc -fpreprocessed -w -mmcu=atmega128 -O2 -s test.i -o /dev/null test.i: In function 'rtems_fdisk_recycle_segment': test.i:107:1: error: unable to find a register to spill in class 'POINTER_REGS' } ^ test.i:107:1: error: this is the insn: (insn 30 29 31 2 (set (reg:HI 26 r26) (reg/v/f:HI 51 [ dpd ])) /home/matthijs/test.i:95 83 {*movhi} (nil)) test.i:107: confused by earlier errors, bailing out $ avr-gcc --version avr-gcc (GCC) 5.1.0 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. On the Arduino bugtracker [1], another testcase with the same symptoms was reported. I'm attaching that here. This testcase works with -O2, but breaks when -Os is used. $ avr-gcc -c -Os -mmcu=atmega328p test2.c -o /dev/null test2.c: In function 'getSlope': test2.c:22:1: error: unable to find a register to spill in class 'POINTER_REGS' } ^ test2.c:22:1: error: this is the insn: (insn 40 38 42 3 (set (reg:SF 63 [ D.1613 ]) (mem:SF (post_inc:HI (reg:HI 16 r16 [orig:73 ivtmp.13 ] [73])) [1 MEM[base: _27, offset: 0B]+0 S4 A8])) /home/matthijs/test.c:15 100 {*movsf} (expr_list:REG_INC (reg:HI 16 r16 [orig:73 ivtmp.13 ] [73]) (nil))) test2.c:22: confused by earlier errors, bailing out [1]: https://github.com/arduino/Arduino/issues/3972