This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: bug in flow.c
- To: Andrew Phillips <atp at pergamentum dot com>
- Subject: Re: bug in flow.c
- From: Jan Dvorak <johnydog at go dot cz>
- Date: Mon, 21 Aug 2000 15:21:53 +0200
- Cc: gcc at gcc dot gnu dot org
- Organization: (XNET.cz)
- References: <200008211220.e7LCKsr29935@dagenham.pergamentum.com>
On Mon, Aug 21, 2000 at 06:20:54AM -0600, Andrew Phillips wrote:
> --- flow.c.orig Mon Jul 31 11:33:28 2000
> +++ flow.c Mon Aug 7 12:22:16 2000
> @@ -2530,6 +2530,9 @@
>
> /* Selectively unlink the sequence. */
> if (q != PREV_INSN (c->head))
> + /* check that we will not orphan b->end
> + * in the case of NEXT_INSN(b->head) == b->end. */
> + if (b->end == NEXT_INSN(q)) b->end = q;
> flow_delete_insn_chain (NEXT_INSN (q), PREV_INSN (c->head));
>
> e->flags |= EDGE_FALLTHRU;
Hi,
shouldn't there be parenthness ? I'm not familiar with flow.c, but it seems
(according to last CVS) that flow_delete_insn_chain should be executed only
when that first 'if' is in case. So coorected (and updated position against
latest CVS) can looks like:
--- flow.c.orig Mon Aug 21 11:18:05 2000
+++ flow.c Mon Aug 21 15:19:07 2000
@@ -2559,8 +2559,14 @@
/* Selectively unlink the sequence. */
if (q != PREV_INSN (c->head))
- flow_delete_insn_chain (NEXT_INSN (q), PREV_INSN (c->head));
-
+ {
+ /* check that we will not orphan b->end
+ * in the case of NEXT_INSN(b->head) == b->end. */
+ if (b->end == NEXT_INSN(q))
+ b->end = q;
+ flow_delete_insn_chain (NEXT_INSN (q), PREV_INSN (c->head));
+ }
+
e->flags |= EDGE_FALLTHRU;
}
Jan Dvorak <johnydog@go.cz>