This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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 for PR fortran/21375


On Sat, Jun 04, 2005 at 10:58:41PM +0200, Tobias Schl?ter wrote:
> Steve Kargl wrote:
> > The first diff was posted here 
> > http://gcc.gnu.org/ml/fortran/2005-05/msg00064.html
> > 
> > I attached a new diff and a testcase.  This patch
> > fixes PR fortran/21375.  The problem is that gfortran
> > does not properly handle the STAT= feature for deallocate.
> > 
> > Bootstrapped and regtested on i386-*-freebsd for mainline?
> > 
> > Ok for mainline?  Ok for 4.0 after regression testing?
> 
> Not yet: you are setting up a variable called error_label, but not using it;
> also this won't work for e.g.
>  DEALLOCATE(a1,a2,stat=i)
> where the deallocation of a1 fails and the one of a2 succeeds, because i only
> gets set for the last deallocation.
> 

I've removed the error_label stuff from the code.  This was essentially
a cut-n-paste from the equivalent code in the allocate case.  I wonder if
we have some cleanup to do.

You're right about the DEALLOCATE(a1,a2,stat=i) case above.  Unfortunately,
I don't know how to fix this.  I assume that inside the for loop of
gfc_trans_deallocate(), I need to check if pstat is set to 1 on each
iteration and if so set a have_seen_problem flag.  Once the for loop
exits, then check have_seen_problem and reset pstat with an appropriate
value.  Any help would be appreciate (in that I don't understand the
trans-*) file too well.

-- 
Steve


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