The following Fortran lines
SUBROUTINE AFprep (ida, idb, jda, jdb, kda, kdb )
IMPLICIT NONE
include 'mpif.h'
USE some_module
interface
SUBROUTINE nothing (azf, ata)
REAL, INTENT(IN) :: azf ( : , : , : )
REAL, INTENT(IN) :: ata ( : , : , : )
END SUBROUTINE nothing
end interface
REAL, PARAMETER :: PI = 3.14159265
REAL( 8 ), PARAMETER :: DPI = 3.14159265358979324D0
REAL, PARAMETER :: PI180 = PI / 180.0
REAL, PARAMETER :: GRAV = 9.80622
INTEGER, INTENT(IN) :: ida, idb, jda, jdb, kda, kdb
REAL :: aensf
REAL, ALLOCATABLE, SAVE :: densq ( : , : , : )
integer :: i, j, status(MPI_STATUS_SIZE)
character (len = 50) :: myfmt
END SUBROUTINE AFprep
are producing the error
Error: USE statement at (1) cannot follow INTERFACE statement at (2)
This is bit odd because USE
is before interface
(unless the compiler moves it around for some reason that I don't see). some_module
is a very large module built earlier and the compiler is GCC-11. I'm not really sure what to do because the compilation goes through if USE some_module
is commented out (moving USE
after interface
results in the same error as expected).