In gcc/config/avr/libgcc.S, revision 143306, a change to __do_global_ctors &
__do_global_dtors was made which makes use of register r20.

This register can be used to pass parameters to the constructors, but it is not
pushed/popped from the stack, so it will get clobbered if a constructor uses
that register.

I have currently worked around it by pushing/popping r20 around the call to
__tablejump__, but I am not convinced that this is the correct fix (the
constructors should probably push & pop r20 themselves).


-- 
           Summary: registers used in __do_global_ctors can get clobbered
           Product: gcc
           Version: 4.5.1
            Status: UNCONFIRMED
          Severity: blocker
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gcc at d-silva dot org
  GCC host triplet: i686-pc-mingw32
GCC target triplet: avr


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

Reply via email to