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

ICE with IFX 2025.0.0 (Release configuration only)

OP1
New Contributor III
409 Views

The following code triggers an ICE with the latest IFX (2025.0.0 at the time of writing), but only in Release configuration, and only when (as shown below) the module M and the submodule S are in distinct files.

Module file (which compiles fine):

MODULE M
TYPE :: W
    CHARACTER(LEN = :), ALLOCATABLE :: STR
END TYPE W
TYPE :: T
    TYPE(W), ALLOCATABLE :: ARRAY(:)
    CONTAINS
        PROCEDURE, PUBLIC :: S
END TYPE T
INTERFACE
    MODULE SUBROUTINE S(SELF)
    CLASS(T) :: SELF
    END SUBROUTINE S
END INTERFACE
END MODULE M

 Submodule file (which leads to an ICE):

SUBMODULE (M) S
CONTAINS
MODULE SUBROUTINE S(SELF)
CLASS(T) :: SELF
SELF%ARRAY = [ SELF%ARRAY(1 : 1), SELF%ARRAY(1 : 1) ]
END SUBROUTINE S 
END SUBMODULE S

When both module and submodule are within the same source file the ICE disappears. The ICE also disappears when using a Debug configuration, irrespective of in what file(s) the module and submodule are defined.

0 Kudos
1 Reply
andrew_4619
Honored Contributor III
391 Views

I think I filed a similar problem some days back, I will try to find the link.

 

0 Kudos
Reply