Hello,
I am experimenting with the CONTIGUOUS attribute and I found to my surprise that passing a non-contiguous array section via a dummy argument that does have this attribute makes no difference. So I wonder if it should - for instance lead to a runtime error message - or not. I compiled the program below with the flag -check:all to see if any runtime error or warning is issued and none is (using Intel Fortran 15). The program works as if this attribute were not present.
Can someone enlighten me? (I can imagine that the attribute is recognised but does not lead to more efficient code ...)
! chktemp.f90 -- ! module temp contains subroutine mytemp( a, n ) real, contiguous, dimension(:) :: a integer, intent(in) :: n a(1:n) = 1.0 end subroutine end module temp program chktemp use temp implicit none real, dimension(10,10) :: aha aha = 0.0 call mytemp( aha(1,:), size(aha(1,:)) ) write(*,'(10f5.2)') aha end program chktemp