[Bug fortran/64986] class_to_type_4.f90: valgrind error: Invalid read/write of size 8

dominiq at lps dot ens.fr gcc-bugzilla@gcc.gnu.org
Fri Apr 3 12:23:00 GMT 2015


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

--- Comment #7 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Further reduced test:

program test
  implicit none
  type t
    integer :: ii
  end type t
  type, extends(t) :: v
    real, allocatable :: rr(:)
  end type v

  type(v) :: b(3)

  b = func7() ! scalar daughter type to array - alloc comps in parent type

contains

  function func7() result(res)
    class(v), allocatable :: res
    allocate (res, source = v(3,[10.0,20.0]))
  end function func7

end program test



More information about the Gcc-bugs mailing list