This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/49466] [4.6/4.7 Regression] Memory leak with assignment of extended derived types
- From: "dominiq at lps dot ens.fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 20 Jun 2011 06:21:33 +0000
- Subject: [Bug fortran/49466] [4.6/4.7 Regression] Memory leak with assignment of extended derived types
- Auto-submitted: auto-generated
- References: <bug-49466-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49466
--- Comment #7 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-06-20 06:21:27 UTC ---
This is due to revision 165973:
Author: janus
Date: Tue Oct 26 17:38:42 2010 UTC (7 months, 3 weeks ago)
Changed paths: 10
Log Message:
2010-10-26 Janus Weil <janus@gcc.gnu.org>
PR fortran/42647
* trans.h (gfc_deallocate_scalar_with_status): New prototype.
* trans.c (gfc_deallocate_scalar_with_status): New function for
deallocation of allocatable scalars.
* trans-array.c (structure_alloc_comps): Call it here ...
* trans-decl.c (gfc_trans_deferred_vars): ... here ...
* trans-stmt.c (gfc_trans_deallocate): ... and here.
2010-10-26 Janus Weil <janus@gcc.gnu.org>
PR fortran/42647
* gfortran.dg/allocatable_scalar_9.f90: Extended.
* gfortran.dg/allocatable_scalar_10.f90: New.
* gfortran.dg/class_19.f03: Extended.
Another test:
program evolve_aflow
implicit none
type :: state_t
real, allocatable :: U(:)
end type state_t
type, extends(state_t) :: astate_t
end type astate_t
type(astate_t) :: a,b
allocate(a%U(1000))
allocate(b%U(1000))
! b%U = a%U
a = b
deallocate(a%U, b%U)
end program