This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR 17624, forward propagate and abnormal PHI's
- From: Jeffrey A Law <law at redhat dot com>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: "gcc-patches at gcc dot gnu dot org Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 23 Sep 2004 23:02:19 -0600
- Subject: Re: [PATCH] Fix PR 17624, forward propagate and abnormal PHI's
- Organization: Red Hat, Inc
- References: <08563805-0DA6-11D9-921D-000A95D692F4@physics.uc.edu>
- Reply-to: law at redhat dot com
On Thu, 2004-09-23 at 15:17, Andrew Pinski wrote:
> The following patch fixes PR 17624 and others testcases which I cannot
> come up with right now.
> Basically we were propagating a expression which used a SSA_NAME which
> occurs in an abnormal PHI which causes an error later.
> This patch prevents these expressions from being propagated.
>
> OK? Bootstrapped and tested on powerpc-apple-darwin.
>
> Thanks,
> Andrew Pinski
>
> Testcase:
> extern void foo (void);
> int c;
> void foo (int n)
> {
> int j = 0;
> try
> {
> for(;;)
> {
> foo ();
> if (j ++ == n)
> break;
> foo ();
> }
> }
> catch (...)
> {
> c = j;
> }
> }
>
> ChangeLog:
> * tree-ssa-forwprop.c (record_single_argument_cond_exprs):
> Reject if any of the operands occur in an abnormal PHI.
This is fine. Please install it along with your testcase into
the appropriate C++ testing framework.
jeff