[Bug target/88640] ICE in mark_reachable_handlers, at tree-eh.c:3926

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jan 4 19:19:00 GMT 2019


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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
-Ofast -fsignaling-nans is a really weirdo combination of options, it says that
NaNs aren't honored, but sNaNs are, so in this case it folds a _7 = 1.0 * _2
that is marked that could throw into just _7 = _2; which can't throw (because
HONOR_SNANS is false due to HONOR_NANS being false).

Anyway, the ICE is because recip does:
                      gimple_stmt_iterator gsi = gsi_for_stmt (stmt);
                      gimple_assign_set_rhs_code (stmt, MULT_EXPR);
                      fold_stmt_inplace (&gsi);
                      update_stmt (stmt);
and fold_stmt_inplace doesn't do maybe_clean_eh_stmt and the caller
(tree-ssa-math-opts.c has many similar spots) don't do either.  Or during
analysis phase of these optimizations we should just punt if any relevant stmts
can throw.


More information about the Gcc-bugs mailing list