Windows IVF 15.0 update 4
In Debug build (with /warn:interfaces) I get:
error #7062: The characteristics of dummy argument 2 of the associated actual procedure differ from the characteristics of dummy argument 2 of the dummy procedure.
The subroutine is declared as:
SUBROUTINE intdeo2_rect(crames,f, a, omega, aw, i, ERR,i_point,sit,ans) USE dyn_array_crames IMPLICIT NONE type(CRAMES_t) :: crames ! jd: Add EXTERNAL attribute, then add the interface ! REAL(i8), INTENT(IN) :: f interface REAL(i8) FUNCTION f(crames,xsi,sit,ans) USE dyn_array_crames USE ieee_arithmetic, ONLY: IEEE_IS_NORMAL IMPLICIT NONE type(CRAMES_t) :: crames REAL(i8), INTENT(IN) :: xsi,sit REAL(i8), INTENT(OUT) :: ans(9) end function f end interface REAL(i8), INTENT(IN) :: a REAL(i8), INTENT(IN) :: omega REAL(i8), INTENT(IN) :: aw(0 : crames%lenaw1-1) REAL(i8), INTENT(OUT) :: i REAL(i8), INTENT(OUT) :: ERR INTEGER, INTENT (IN) :: i_point REAL(i8), INTENT(IN) :: sit REAL(i8), INTENT(OUT) :: ans(i_point)
Note the INTENT on the interface to the function argument f
In the auto-generated module I get:
MODULE INTDEO2_RECT__genmod INTERFACE SUBROUTINE INTDEO2_RECT(CRAMES,F,A,OMEGA,AW,I,ERR,I_POINT, & &SIT,ANS) USE DYN_ARRAY_CRAMES INTEGER(KIND=4), INTENT(IN) :: I_POINT TYPE (CRAMES_T) :: CRAMES INTERFACE FUNCTION F(CRAMES,ARG1,ARG2,ARG3) USE DYN_ARRAY_CRAMES TYPE (CRAMES_T) :: CRAMES REAL(KIND=8) :: ARG1 REAL(KIND=8) :: ARG2 REAL(KIND=8) :: ARG3(*) REAL(KIND=8) :: F END FUNCTION F END INTERFACE REAL(KIND=8), INTENT(IN) :: A REAL(KIND=8), INTENT(IN) :: OMEGA REAL(KIND=8), INTENT(IN) :: AW(0:CRAMES%LENAW1-1) REAL(KIND=8), INTENT(OUT) :: I REAL(KIND=8), INTENT(OUT) :: ERR REAL(KIND=8), INTENT(IN) :: SIT REAL(KIND=8), INTENT(OUT) :: ANS(I_POINT) END SUBROUTINE INTDEO2_RECT END INTERFACE END MODULE INTDEO2_RECT__genmod
Note the lack of INTENT on the args of the declaration of function F interface.
I cannot say if that contributes to the error message or not.
If I remove /warn:interfaces, the code runs properly (inspected with debugger, and results correct)
Jim Dempsey