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/31320] Illegal read with gfortran.dg/alloc_comp_assign_2.f90 and *_3.f90



------- Comment #4 from dfranke at gcc dot gnu dot org  2007-07-05 16:09 -------
Some more examples. Uncomment either assignment to 'y' to have valgrind report
the errors indicated at the end of the line:

  type :: a
    integer, allocatable :: i(:)
  end type a
  type(a) :: x, y

  x = a ((/ 1,2,3 /))
! y = a (x%i(1:3))       ! ok
! y = a (x%i(1:))        ! invalid read
! y = a (x%i(:3))        ! invalid read
! y = a (x%i(:))         ! invalid read, memory leak
! y = a (x%i)            ! invalid read, memory leak
! y = x                  ! invalid read
end


-- 


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


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