Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
1 View

Missing interface check?

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

 

0 Kudos
1 Reply
Highlighted
1 View

Yes, we should report the

Yes, we should report the missing declaration. It looks to me as if this will be fixed in 17.0 Update 1, based on my testing of internal builds.

Retired 12/31/2016
0 Kudos