This is the mail archive of the gcc-bugs@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]

[Bug fortran/44556] [4.5/4.6 Regression] incorrect error: Stat-variable at (1) shall not be DEALLOCATEd within the same DEALLOCATE statement



------- Comment #3 from sgk at troutmask dot apl dot washington dot edu  2010-06-16 17:10 -------
Subject: Re:  [4.5/4.6 Regression] incorrect error:  Stat-variable at (1) shall
not be DEALLOCATEd within the same DEALLOCATE statement

On Wed, Jun 16, 2010 at 02:34:34PM -0000, kargl at gcc dot gnu dot org wrote:
> 
> ------- Comment #2 from kargl at gcc dot gnu dot org  2010-06-16 14:34 -------
> (In reply to comment #1)
> > The following check is to simplistic, it does not work for structures but only
> > for simple object names. - with structures, it gets more complicated as also
> > comparing the name of the last part-ref won't work - but one needs to walk
> > through the whole structure references.
> 
> Not sure how I got added to the CC list.  Remove myself.
> 

BTW, this won't work either.

program oh_my

   type a
      integer, allocatable :: b(:), d(:)
      character(len=80) :: err
      integer :: src
   end type a

   integer j
   type(a) :: c

   c%err = 'ok'

   allocate(c%b(2), errmsg=c%err, stat=j)

   deallocate(c%b, errmsg=c%err, stat=j)

end program oh_my

gfortran does not walk the components of a derived type.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44556


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