This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] fix mark_single_exit_loops
- From: Mostafa Hagog <MUSTAFA at il dot ibm dot com>
- To: Steven Bosscher <stevenb at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org, Jeffrey A Law <law at redhat dot com>, rakdver at atrey dot karlin dot mff dot cuni dot cz
- Date: Thu, 10 Mar 2005 14:04:06 +0200
- Subject: Re: [PATCH] fix mark_single_exit_loops
>
> ChangeLog? A comment before that for loop to explain when
> and why loop can be NULL? Test case?
I cannot provide a test case because this happens with SMS patch that
isn't yet in mainline. However, I think that the above explanation is
clear
enough to understand what is wrong in that code.
>
> Gr.
> Steven
Thanks,
Mostafa.
>
>
> > Index: cfgloop.c
> > ===================================================================
> > RCS file: /cvs/gcc/gcc/gcc/cfgloop.c,v
> > retrieving revision 1.49
> > diff -c -p -r1.49 cfgloop.c
> > *** cfgloop.c 1 Mar 2005 13:44:42 -0000 1.49
> > --- cfgloop.c 10 Mar 2005 10:24:36 -0000
> > *************** mark_single_exit_loops (struct loops *lo
> > *** 300,306 ****
> > continue;
> > for (loop = bb->loop_father;
> > ! loop != e->dest->loop_father;
> > loop = loop->outer)
> > {
> > /* If we have already seen an exit, mark this by the edge
> > that
> > --- 300,306 ----
> > continue;
> > for (loop = bb->loop_father;
> > ! loop && (loop != e->dest->loop_father);
> > loop = loop->outer)
> > {
> > /* If we have already seen an exit, mark this by the edge
> > that