A customer sent me the following source code. When FTN95 compiles it the error 144 is output, although we can't see that there is anything faulty. We have checked with other compilers, which didn't complain:
module type1_module
private
public type1
type :: type1
integer :: id
end type type1
end module type1_module
!----------------------------------------------------------
module module1
private
public msg_len
public func1 ! delete this line and the error is gone
integer, parameter :: msg_len=256
contains
! if this function is deleted the error is gone
function func1(t1_inst1) result(ierr)
use type1_module, only: type1
type(type1), intent(in) :: t1_inst1
integer:: ierr
ierr=0
end function func1
end module module1
!----------------------------------------------------------
module module2
use module1, only: msg_len
! if the following 2 lines are activated -> no error
! private
! public msg
character(len=msg_len) :: msg
end module module2
!----------------------------------------------------------
program main
use type1_module, only: type1
use module2, only: msg
type(type1) :: t1_inst2
msg='Main running...' !ftn95 v7.20 error: Type TYPE(TYPE1) has been declared but not defined
write(6,*) msg
t1_inst2%id=2 !ftn95 v5.40 error: id is not a component of TYPE1
end program main
You will have noticed a few comments. For example, if you delete line 19, the error 144 is gone. This is definitely strange. Please check.
Thank you.
Joerg Kuthe www.qtsoftware.com