[Bug tree-optimization/71881] [4.9/6/7 Regression] ICE on valid code at -O3 with -g enabled on x86_64-linux-gnu: cannot update SSA form
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jul 15 08:52:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71881
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
So in theory release_ssa_name()s insert_debug_temp_for_var_def should have
saved
us here. But! We have a single debug-use left plus the definition stmt is
i_21 = i_29 + 1;
and thus i_29 + 1 counts as sth we can use as replacement.
BUT!
This only works if i_29 isn't yet removed which it is because destroy_loop
doesn't care about the BB order in its BB removal process (it has DOM order
but walks forward).
With that fixed the debug stmt ends up as
<bb 9>:
b = 0;
# DEBUG i => 0 + 1
which is correct but also unfolded.
/* If we didn't replace uses with a debug decl fold the
resulting expression. Otherwise we end up with invalid IL. */
if (TREE_CODE (value) != DEBUG_EXPR_DECL)
{
gimple_stmt_iterator gsi = gsi_for_stmt (stmt);
fold_stmt_inplace (&gsi);
}
but fold_stmt_inplace doesn't really do much to debug stmts.
More information about the Gcc-bugs
mailing list