The following cut-down code has a local array, CNODE, which has the same name as a component of the derived type ROTMAT.
module lx_types
implicit none
type :: rotmat
integer :: kcon
integer, allocatable :: cnode(:)
end type rotmat
end module lx_types
module blocks
use lx_types
implicit none
type (rotmat) :: rotm
end module blocks
subroutine rot_stn(stn_a, stn_r)
use blocks, only: rotm
implicit none
integer :: i, nc, ncn, stn_a, stn_r
real, allocatable :: cnode(:)
ncn = rotm%kcon
nc = 0
if ( ncn > 0 ) then
allocate (cnode(ncn))
cnode = rotm%cnode
do i = 1, ncn
if ( cnode(i) <= stn_a ) nc = nc + 1
enddo
deallocate (cnode)
endif
stn_r = stn_a - nc
end subroutine rot_stn
When the code is compiled without /check, there is no problem, other than a misspelled word, 'auotmatically', in a warning message.
When /check or /checkmate is specified, with or without /64, an internal compiler error occurs.
I used the recently released Version 8.61.