https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67915
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-10-12
CC| |rsandifo at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed. Awww - that code again :/
The issue is that cleanup_control_expr_graph doing
case GIMPLE_COND:
val = fold_binary_loc (loc, gimple_cond_code (stmt),
boolean_type_node,
gimple_cond_lhs (stmt),
gimple_cond_rhs (stmt));
break;
now walks the SSA def chain but those defs may be released (were in a CFG
cleanup which can end up removing BBs and releasing SSA names).
My plan for the above was to remove the fold_binary and just detect whether
this is a true/false condition (see in gimple-fold how we canonicalize those).
Last time I tried this there were some missed CFG cleanups because of that
(unfolded GIMPLE_CONDs).
But of course the fallback was always to do this cleanup in some better
order (though CFG cleanup cannot compute sth like dominators for the obvious
reason - unreachable blocks).