http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51784
--- Comment #33 from Iain Sandoe <iains at gcc dot gnu.org> 2012-01-15 11:25:31 UTC --- Created attachment 26330 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26330 second (non working) go I'm finding this moderately hard. I understand what you're suggesting that I should do - but between gccint.pdf, looking at other .md files and so on there is really rather scarce information -- trial & error is not a productive way forward .. so I'm still a bit stuck. The attached does the right thing with the testcase - it inserts the restore when PIC is used and not when it isn't. But the compiler fails to bootstrap because eh_personality.cc in the c++ library seems to cause the insert of the nonlocal_rx (for eh) but then, somehow the initial use of the pic register is optimized away .. and thus we end up with a load of "L000003$pd" can't be undefined... ... so ... how can I ensure that the test of "uses_pic_" is only done after optimization? (or any other help would be welcome).
