https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60040

Matthijs Kooijman <matthijs at stdin dot nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |matthijs at stdin dot nl

--- Comment #8 from Matthijs Kooijman <matthijs at stdin dot nl> ---
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

Reply via email to