Commit 2bf87216 by Jakub Jelinek Committed by Jakub Jelinek

cfgcleanup.c (try_optimize_cfg): Make sure merge_blocks doesn't merge bb with itself.

	* cfgcleanup.c (try_optimize_cfg): Make sure merge_blocks doesn't
	merge bb with itself.

	* gcc.c-torture/compile/20020605-1.c: New test.

From-SVN: r54456
parent 135fd2d8
2002-06-10 Jakub Jelinek <jakub@redhat.com>
* cfgcleanup.c (try_optimize_cfg): Make sure merge_blocks doesn't
merge bb with itself.
2002-06-10 Richard Henderson <rth@redhat.com> 2002-06-10 Richard Henderson <rth@redhat.com>
* config/alpha/alpha.md (builtin_zap): Fix thinkos expanding mask. * config/alpha/alpha.md (builtin_zap): Fix thinkos expanding mask.
......
...@@ -1675,6 +1675,7 @@ try_optimize_cfg (mode) ...@@ -1675,6 +1675,7 @@ try_optimize_cfg (mode)
&& !(s->flags & EDGE_COMPLEX) && !(s->flags & EDGE_COMPLEX)
&& (c = s->dest) != EXIT_BLOCK_PTR && (c = s->dest) != EXIT_BLOCK_PTR
&& c->pred->pred_next == NULL && c->pred->pred_next == NULL
&& b != c
/* If the jump insn has side effects, /* If the jump insn has side effects,
we can't kill the edge. */ we can't kill the edge. */
&& (GET_CODE (b->end) != JUMP_INSN && (GET_CODE (b->end) != JUMP_INSN
......
2002-06-10 Jakub Jelinek <jakub@redhat.com>
* gcc.c-torture/compile/20020605-1.c: New test.
2002-06-07 Roger Sayle <roger@eyesopen.com> 2002-06-07 Roger Sayle <roger@eyesopen.com>
* gcc.dg/20020607-2.c: New test case. * gcc.dg/20020607-2.c: New test case.
......
/* This testcase caused on IA-32 -O2 endless loop in
merge_blocks when trying to merge a basic block
with itself. */
void f (void)
{
char *c;
do
{
if (c)
break;
}
while (1);
if (!c)
while (1)
f ();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment