This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/67915] ICE on valid code at -O2 and -O3 on x86_64-linux-gnu
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 12 Oct 2015 07:50:57 +0000
- Subject: [Bug tree-optimization/67915] ICE on valid code at -O2 and -O3 on x86_64-linux-gnu
- Auto-submitted: auto-generated
- References: <bug-67915-4 at http dot gcc dot gnu dot org/bugzilla/>
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).