http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58405
--- Comment #2 from semicontinuity at yandex dot ru --- Now I cannot reproduce that as well.. It seems that I've compiled it with -ffixed-r30 -ffixed-r31 (different from original intention) - in this case it produces this kind of assembly . Still, the code could be more optimal, without rjmp, push/pop - just with ijmp replaced by 2 pushes + ret. Thanks.