If the c code contains a global register variable the compiler generate wrong
code. gcc uses the global register var for function calls but will not save
them on stack before using them. Only register vars from r10 to r18 
affected. Registers lower then 10 seem OK.

Problem occures when:
    avr-gcc -O3 -g -mmcu=at90s8515 -c main.c
    avr-gcc -O3 -g -mmcu=at90s8515 main.o -o go

I hope the next page give me the chance to add the source :-)

-- 
           Summary: global register variable: register is used for function
                    calls
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: lts-rudolph at gmx dot de
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-linux-gnu
GCC target triplet: avr-unknown-none


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18798

Reply via email to