Here is another example code that FTN 95 rejects as being incorrect.
module allow_mod
implicit none
private
public :: allow_t
type level_t
integer :: nval
integer, allocatable :: val(:),map(:)
end type level_t
type allow_t
integer :: N, i5modNx = -1
type(level_t) :: lt
type(level_t), allocatable :: l(:),k(:)
end type allow_t
end module allow_mod
subroutine set_allow( modvals, allow )
use allow_mod, only: allow_t
implicit none
integer, intent(in) :: modvals(:)
type(allow_t), intent(out), allocatable :: allow(:)
integer :: i,j,jx,N, maxN
logical :: mask(10) = .true.
allocate( allow(size(modvals)) )
maxN = maxval( allow(:)%N )
do i = 1, size(modvals)
N = allow(i)%N
do j = 1, maxN
jx = mod(j,maxN)
mask(jx) = mask(jx) .and. (allow(i)%lt%map( mod(j,N) )/=0)
print *,i,j,jx,mask(jx)
enddo
enddo
return
end subroutine set_allow
The compiler says
ERROR S:\euler\bug.F90 29: map is not a component of LEVEL_T
ERROR S:\euler\bug.F90 29: Compilation abandoned