https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38319

--- Comment #8 from janus at gcc dot gnu.org ---
(In reply to Paul Thomas from comment #0)
> alloc_comp_assign_4.f90      nested constructors(line 56)

With current trunk I see additional leaks in lines 28 and 29. Those are again
due to not auto-deallocating variables in the main program, which is an F08
feature, not a gfortran bug.

The leak in line 56 persists. Here is a reduced test case for that:

  type :: a
    character(4), allocatable :: ch(:)
  end type a
  call test_ab6 ()
contains
  subroutine test_ab6 ()
    type b
      type(a)  :: a
    end type b
    type c
      type(b), allocatable :: b(:) 
    end type c
    type(c)    :: p
    p = c((/b(a((/"Mary","Lamb"/)))/))
  end subroutine
end

While 4.4 shows only a single 8-byte leak, 4.6 to trunk shows two of them.

Reply via email to