Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all articles
Browse latest Browse all 5691

Missing interface check?

$
0
0

In the code below, I would have expected an error related to the type of F not being defined in the submodule function definition (starting at line 14), since I thought that only when MODULE PROCEDURE (instead of MODULE FUNCTION) was used the repetition of the procedure interface (found in the parent module) could be omitted.

This is with Intel Parallel Studio XE 17.

MODULE M
IMPLICIT NONE
INTERFACE
    MODULE FUNCTION F(I)
        IMPLICIT NONE
        INTEGER :: I,F
    END FUNCTION F
END INTERFACE
END MODULE M

SUBMODULE (M) S
IMPLICIT NONE
CONTAINS
    MODULE FUNCTION F(I)
        IMPLICIT NONE
        INTEGER :: I
        F = I
    END FUNCTION F
END SUBMODULE S

PROGRAM P
USE M
IMPLICIT NONE
WRITE(*,*) F(1)
END PROGRAM P

 


Viewing all articles
Browse latest Browse all 5691

Trending Articles