Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Another (!) bug with IMPORT

OP1
New Contributor III
67 Views

As shown, the following code does not compile with ifx 2026.0.0 (Debug and Release) on Windows.

MODULE M
IMPLICIT NONE
TYPE :: T
    CONTAINS 
    PROCEDURE, NOPASS :: S => T_S
    ! PROCEDURE, NOPASS :: SOME_OTHER_BINDING_NAME => T_S
END TYPE T
INTERFACE
    MODULE SUBROUTINE T_S
    END SUBROUTINE T_S
END INTERFACE
END MODULE M
 
 
MODULE N
IMPLICIT NONE
INTERFACE
    MODULE SUBROUTINE S
    END SUBROUTINE S
END INTERFACE
END MODULE N

 
SUBMODULE (N) S
USE :: M, ONLY : T
IMPORT, ALL
IMPLICIT NONE
CONTAINS
MODULE SUBROUTINE S
END SUBROUTINE S
END SUBMODULE S

The compiler erroneously claims that on line 26:

error #8847: A use-associated entity from module M conflicts with a host-associated entity explicitly made accessible by an IMPORT statement in the same scope.   [S]

 This does not make any sense at all, since S is simply a binding name for a procedure bound to the derived type T.

The code will compile if you comment out line 5 and uncomment line 6 (essentially, using a different binding name that does not "collide" with S).

Or, the code will compile if lines 5 and 6 are left as they are and line 25 is commented out.

0 Kudos
0 Replies
Reply