Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29283 Discussions

ICE with IFX 2025.0.0 (Release configuration only)

OP1
New Contributor III
357 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
339 Views

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

 

0 Kudos
Reply