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  <ja...@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  <ja...@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

Reply via email to