This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR 17624, forward propagate and abnormal PHI's


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]