http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50678
--- Comment #42 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-10-17 22:58:24 UTC --- > > Because %rbx is saved in the prologue of do_fail. > > hm. Isn't that the correct action? Yes, this is correct, but this will also restore the correct %rbx in the caller. > also - _ada_c52104y saves %rbx in its prologue. Yes, but the thrower and the handler are within _ada_c52104y, so %rbx isn't restored in-between. > I thought we were looking for a situation where the saves were OK, but the > restores were wrong - and I was expecting the c++ emulation to do roughly the > same thing. Perhaps there's a difference in the way it unwinds. You need to make sure that %rbx isn't saved/restored between thrower and handler.