=?ISO-8859-2?Q?Pawe=B3_Stawicki?= <sta...@gmail.com> wrote:

> I found a issue in the optimization part of gcc-avr.

If I run your code through my compiler, I get the following assembler
output:

..global _Z1fv
        .type   _Z1fv, @function
_Z1fv:
        push r28
        push r29
/* prologue: function */
/* frame size = 0 */
/* stack size = 2 */
..L__stack_usage = 2
        call _Z5getchv
        mov r29,r24
        ldi r24,lo8(0)
        mov r28,r24
        call _Z5getchv
        add r28,r24
        adc r29,__zero_reg__
        movw r24,r28
/* epilogue start */
        pop r29
        pop r28
        ret
        .size   _Z1fv, .-_Z1fv

This is GCC 4.5.1, but with a patch for bug #46779 (which is only
fixed in GCC 4.7 and GCC 4.6).  I'm not sure whether this would be
"your" bug, too, but I think it's possible.

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)

_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to