https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44744
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |burnus at gcc dot gnu.org --- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> --- Another variant from lsdalton – or rather the https://github.com/openrsp/openrsp/archive/v1.0.0.tar.gz it downloads during the build. FLANG diagnoses the LSDalton issue as: error(/home/jehammond/DALTON/lsdalton/build/_deps/openrsp_sources-src/src/ao_dens/rsp_property_caching.f90:2164): Assign: mismatching element counts in array assignment (to 6, from 3) * * * GCC fails to do so. Testcase: – the problem is that the RHS is 3 and the LHS is 6: implicit none real,allocatable :: A(:,:,:) integer :: n, n2, i n = 6 n2 = 3 allocate(A(3,n,3)) do i = 1, 3 print *, shape(a), '|', shape(f(n2)) a(i,:,:) = f(n2) end do deallocate(A) contains function f(n) integer :: n real :: f(n,3) f = 99.0 end end