[Bug middle-end/93273] "error: missing definition" and "internal compiler error: verify_ssa failed", in code involving _setjmp

2020-01-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93273

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from Richard Biener  ---
Fixed.

[Bug middle-end/93273] "error: missing definition" and "internal compiler error: verify_ssa failed", in code involving _setjmp

2020-01-15 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93273

--- Comment #4 from CVS Commits  ---
The master branch has been updated by Richard Guenther :

https://gcc.gnu.org/g:37e27de43133b87ceb529d863f0d1f54d87cf2d8

commit r10-5982-g37e27de43133b87ceb529d863f0d1f54d87cf2d8
Author: Richard Biener 
Date:   Wed Jan 15 13:29:25 2020 +0100

middle-end/93273 - fix sinking clobbers across backedges

The previous work to fix PR93199 didn't take into account backedges
when defering insertion.  The following simply avoids to defer in that
case since we know we'll not take secondary opportunities there.

2020-01-15  Richard Biener  

PR middle-end/93273
* tree-eh.c (sink_clobbers): If we already visited the destination
block do not defer insertion.
(pass_lower_eh_dispatch::execute): Maintain BB_VISITED for
the purpose of defered insertion.

* g++.dg/torture/pr93273.C: New testcase.

[Bug middle-end/93273] "error: missing definition" and "internal compiler error: verify_ssa failed", in code involving _setjmp

2020-01-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93273

--- Comment #3 from Richard Biener  ---
(In reply to Richard Biener from comment #2)
> Confirmed.  Wrecked by
> 
> #1  0x01627e0d in sink_clobbers (bb= (9)>, 
> sunk=0x391bb90, found_opportunity=0x0)
> at /space/rguenther/src/gcc-work1/gcc/tree-eh.c:3683
> 3683  SET_USE (use_p, gimple_vdef (first_sunk));
> 
> thus mine.

We're sinking a clobber across a "backedge", those are not picked up by
the queued insertion.  Didn't figure this would happen ... (but also
didn't think about abnormal edges here).  Usually EH doesn't form loops...

[Bug middle-end/93273] "error: missing definition" and "internal compiler error: verify_ssa failed", in code involving _setjmp

2020-01-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93273

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2020-01-15
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Richard Biener  ---
Confirmed.  Wrecked by

#1  0x01627e0d in sink_clobbers (bb=, 
sunk=0x391bb90, found_opportunity=0x0)
at /space/rguenther/src/gcc-work1/gcc/tree-eh.c:3683
3683  SET_USE (use_p, gimple_vdef (first_sunk));

thus mine.

[Bug middle-end/93273] "error: missing definition" and "internal compiler error: verify_ssa failed", in code involving _setjmp

2020-01-15 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93273

Andrew Pinski  changed:

   What|Removed |Added

  Component|c++ |middle-end

--- Comment #1 from Andrew Pinski  ---
Note the reason why _setjmp vs f is because _setjmp is marked with returns
twice attribute.