In at least one case where a lot of local variables have been used in a function the stackpointer is restored from a register pair where the it have never been saved.
--
Summary: Stackpointer is not restored correct at end of function
Product: gcc
Version: 3.4.3
Status: UNCONFIRMED
Severity: critical
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bl at rosetechnology dot dk
GCC target triplet: avr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25722
