This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/54980] [4.8 regression] gimple check: expected gimple_cond(error_mark), have gimple_call() in gimple_cond_set_lhs, at gimple.h:2578
- From: "hubicka at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 23 Oct 2012 14:48:05 +0000
- Subject: [Bug lto/54980] [4.8 regression] gimple check: expected gimple_cond(error_mark), have gimple_call() in gimple_cond_set_lhs, at gimple.h:2578
- Auto-submitted: auto-generated
- References: <bug-54980-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54980
--- Comment #7 from Jan Hubicka <hubicka at gcc dot gnu.org> 2012-10-23 14:48:05 UTC ---
This does not seem to reproduce for me. The following patch should however fix
it.
Index: tree-ssa-loop-ivcanon.c
===================================================================
--- tree-ssa-loop-ivcanon.c (revision 192711)
+++ tree-ssa-loop-ivcanon.c (working copy)
@@ -364,6 +364,10 @@ loop_edge_to_cancel (struct loop *loop)
else
edge_to_cancel = EDGE_SUCC (edge_to_cancel->src, 0);
+ /* We only can handle conditionals. */
+ if (!(edge_to_cancel->flags & (EDGE_TRUE_VALUE | EDGE_FALSE_VALUE)))
+ continue;
+
/* We should never have conditionals in the loop latch. */
gcc_assert (edge_to_cancel->dest != loop->header);