With the following code, the compiler issues a warning
warning 1093 - TARGET attribute used where POINTER may be preferred
What is the reason for this? Note that A POINTER cannot be used since the actual argument is not a POINTER.
One possibiliy is the warning means something like:
warning 1093 - The actual argument must be contiguous when the TARGET attribute is used on the dummay argument.
module mmm
type xxx_t
sequence
real :: q
end type xxx_t
contains
subroutine sss(a)
type(xxx_t), intent(inout), target :: a(:)
real, pointer :: p
do i=1, size(a)
p => a(i)%q
p = real(i)
end do
end subroutine sss
end module mmm
program anon
use mmm
type(xxx_t), allocatable :: a(:)
allocate(a(10))
call sss(a)
print *, a%q
end program anon