mecej4
Joined: 31 Oct 2006 Posts: 1886
|
Posted: Thu Feb 17, 2022 4:37 pm Post subject: Unexpected warning for valid code |
|
|
In the following code, DSNAME is a character variable of length 8.
Code: | subroutine get_mask(dsname,is_lin,seq_no)
character(len=8), intent(in) :: dsname
logical, intent(out) :: is_lin(9)
integer, intent(out) :: seq_no
!
if(dsname(1:7).eq.'Misra1a')then
is_lin(1:2)=[ .true., .false. ]
seq_no=1
else if(dsname(1:7).eq.'Chwirut')then
is_lin(1:3)= [ .false., .false.,.false. ]
seq_no=2
else if(dsname.eq.'Eckerle4')then
is_lin(1:6)= [ .true., .false., .true., .false., .true., .false. ]
seq_no=3
else
write(*,*)' Unknown data set name ',dsname
stop
endif
return
end subroutine |
The 8.61 version of the compiler does not give any warnings for this code, but the 8.83 version (with or without /64) says:
Code: |
[FTN95/x64 Ver. 8.83.0 Copyright (c) Silverfrost Ltd 1993-2021]
0006) if(dsname(1:7).eq.'Misra1a')then
WARNING - Procedure expected for argument DSNAME.
0009) else if(dsname(1:7).eq.'Chwirut')then
WARNING - Procedure expected for argument DSNAME.
NO ERRORS, 2 WARNINGS [<GET_MASK> FTN95 v8.83.0] |
|
|