In the following program, a type declaration (LOGICAL) is missing for the only variable in the program. Despite the IMPLICIT NONE, the compiler thinks that the variable is implicitly typed as real.
program falsemsg
implicit none
!
if(.not.error)then
print *,'No errors found'
else
print *,'Errors in input data, aborting'
stop
endif
end program
The compiler says
[FTN95/Win32 Ver. 8.51.0 Copyright (c) Silverfrost Ltd 1993-2019]
0004) if(.not.error)then
*** REAL(KIND=1) variables, such as ERROR, cannot be in logical expressions (with '.NOT.')
1 ERROR [<FALSEMSG> FTN95 v8.51.0]
*** Compilation failed
Gfortran says
Error: Symbol 'error' at (1) has no IMPLICIT type