On Wed, Feb 27, 2019 at 12:20 AM Richard Biener <rguent...@suse.de> wrote: > > On Tue, 26 Feb 2019, Jakub Jelinek wrote: > > > On Tue, Feb 26, 2019 at 05:18:17PM +0100, Jakub Jelinek wrote: > > > > > Shall I modify the patch for that? > > > > > > > > Might it even simplify the patch? If not the only comment on the > > > > original patch is that it would be nice to test it on a SJLJ EH > > > > target ... > > > > > > 1 file changed, 29 insertions(+), 16 deletions(-) > > > so not really simplify it, but not terrible either. > > > > > > Here is the incremental (untested) diff of what handles that. > > > > > > I don't have access to any standard SJLJ EH targets, but will try > > > --enable-sjlj-exceptions on x86_64-linux to see how far I get with that. > > > > Full updated patch that passed normal bootstrap/regtest on x86_64-linux and > > i686-linux. > > > > --enable-sjlj-exceptions bootstrap on x86_64-linux failed miserably, > > some entry-points are removed from libgcc_s.so in that case and > > make: relocation error: /lib64/libgc.so.1: symbol __gcc_personality_v0 > > version GCC_3.3.1 not defined in file libgcc_s.so.1 with link time reference > > On the other side, even without SJLJ EH, the testsuite coverage is quite > > good, at least during development of the patch I made several mistakes and > > each time there were dozens to hundreds of failing tests in the testsuite, > > including __builtin_setjmp, non-local goto, etc. > > > > That said, if anybody is able to test this on some SJLJ setup, it would be > > greatly appreciated. > > Patch is OK. I suppose auto-testers will pick up fallout and we > can always revert... > > Richard. > > > 2019-02-26 Jakub Jelinek <ja...@redhat.com> > > > > PR tree-optimization/89280 > > * tree-cfgcleanup.c (maybe_dead_abnormal_edge_p, > > builtin_setjmp_setup_bb): New functions. > > (cleanup_control_flow_pre): Ignore maybe_dead_abnormal_edge_p edges. > > When visiting __builtin_setjmp_setup block, queue in special > > setjmp_vec vector edges from .ABNORMAL_DISPATCHER to corresponding > > __builtin_setjmp_receiver. Remove .ABNORMAL_DISPATCHER basic blocks > > from visited after the loop if they don't have any visited successor > > blocks. > > > > * gcc.c-torture/compile/pr89280.c: New test. > > * gcc.dg/torture/pr57147-2.c: Don't expect a setjmp after noreturn > > function. Skip the test for -O0. > >
I got FAIL: gcc.dg/torture/pr57147-2.c -O1 scan-tree-dump-not optimized "setjmp" FAIL: gcc.dg/torture/pr57147-2.c -O2 -flto -fno-use-linker-plugin -flto-partition=none scan-tree-dump-not optimized "setjmp" FAIL: gcc.dg/torture/pr57147-2.c -O2 scan-tree-dump-not optimized "setjmp" FAIL: gcc.dg/torture/pr57147-2.c -O3 -g scan-tree-dump-not optimized "setjmp" FAIL: gcc.dg/torture/pr57147-2.c -Os scan-tree-dump-not optimized "setjmp" with unix/-fpic on x86. Should test pass with -fPIC? -- H.J.