https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77504
kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org --- Comment #20 from kargl at gcc dot gnu.org --- (In reply to Tiziano Müller from comment #19) > > *** snip: modb.f90 *** > module modb > use moda, only: funca > contains > PURE SUBROUTINE funcb(oarr) > REAL, DIMENSION(:), INTENT(OUT) :: oarr intent(out) causes oarr to be deallocated on entry into funcb(). > REAL, ALLOCATABLE, DIMENSION(:, :) :: arr > > oarr(:) = 0.0 oarr(:) is an array section of an unallocated array. This is invalid Fortran. So gfortran can do whatever she wants with the code. > CALL funca(arr, ubound(oarr, 1)) > oarr = MATMUL(TRANSPOSE(arr), oarr)*1. > END SUBROUTINE funcb > end module > *** end snip ***