------- Comment #4 from daney at gcc dot gnu dot org 2007-06-22 08:38 ------- Looking at the rtl dumps of unwind-dw2.c compiled with -O1 I find:
In unwind-dw2.c.135r.subreg (_Unwind_Resume): . . . (insn 72 71 73 6 ../../../trunk/libgcc/../gcc/unwind.inc:216 (parallel [ (unspec [ (reg:SI 223) ] 7) (clobber (scratch:SI)) ]) 349 {eh_set_lr_si} (nil)) . . . And in unwind-dw2.c.137r.cse1 (_Unwind_Resume): . . . DCE: Deleting insn 72 deleting insn with uid = 72. . . . The insn eh_set_lr_si (see the patch) only clobbers a scratch register, and since we cannot split it to say we set the return address until after reload, I don't know how to keep it from being deleted unless we say it is volatile. I am a bit surprised that the very first thing I tried worked, but after more thought I cannot come up with anything else. The patch fixes all c++ and libstdc++ testsuite regressions caused by the dateflow merge (on mipsel-linux), so I would like to commit it. Thoughts? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32437