This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix for PR fortran/21375
On Tue, Jun 07, 2005 at 09:45:39PM +0200, Tobias Schl?ter wrote:
> > PR fortran/17792
> > PR fortran/21375
> > * gfortran.dg/pr21375.f90: New test.
>
> Please give testcases expressive names. The PR number can always be looked up
> in the testcase itdelf, the ChangeLog and CVS history.
OK. I'll change the name to deallocate_stat.f90 for the commit.
> Other than that this is ok. I'd prefer, if ...
>
> > + (2) deallocate(a1, a2, a3, stat=i) is translated into the following
> > + _gfortran_deallocate(a1, &stat)
> > + astat = sat
> > + _gfortran_deallocate(a2, &stat)
> > + astat = astat + stat
> > + _gfortran_deallocate(a3, &stat)
> > + astat = astat + stat
> > + In case (1), we simply return at the end of the for loop. In case (2)
> > + we set STAT= astat. */
>
> ... you changed that to initialize 'astat' to zero, and then always
> incrementing by 'stat', this way you could do away with the special case.
I agree. But in my 10+ hours of trying to figure out how tree-ssa
stuff works, I never stumbled on the magic incantation on how to
initialize a variable.
--
Steve