[Bug tree-optimization/106923] [13 Regression] ICE in eliminate_unnecessary_stmts, at tree-ssa-dce.cc:1512 since r13-2518-ga262f969d6fd936f

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Sep 13 12:34:22 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106923

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu.org

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
It's a latent bug in function splitting.  When we outline a part of a
returns-twice function the outlined part retains the 'returns-twice' attribute
and thus now techincally the function calls setjmp.

DCE now correctly asserts that a setjmp cannot appear out of nowhere and if it
were there cfun->calls_setjmp should better indicate that.

The easiest fix appears to be to disallow splitting returns-twice functions
or amend check_forbidden_calls and forcefully clear the flag from the split
part.

Honza?


More information about the Gcc-bugs mailing list