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

ICE with ifx 2025.0.0

OP1
New Contributor III
1,050 Views

This code ICEs with the 2025.0.0 Intel Fortran Compiler (IFX).

 

TYPE :: STR_ARRAY
    CHARACTER(LEN = :), ALLOCATABLE :: STRINGS(:)
END TYPE STR_ARRAY
 
TYPE(STR_ARRAY) :: ARRAY_OF_ARRAYS(1)
CHARACTER(LEN = :), ALLOCATABLE :: ARRAY(:)

ARRAY_OF_ARRAYS(1)%STRINGS = ['AAA', 'BBB', 'CCC']

! The following line, if uncommented, leads to an ICE.
ALLOCATE(ARRAY(1), MOLD = ARRAY_OF_ARRAYS(1)%STRINGS(1))

! This alternative approach does not lead to an ICE. 
ALLOCATE(ARRAY(1), MOLD = '123')

END

 

4 Replies
Shiquan_Su
Moderator
901 Views

Thanks for posting this issue. In order for us to reproduce your issue and further investigate, would you please improve your example by providing a fully compilable unit including the current code snippet, the compile command to compile, and the full error message you see during compilation? You may provide a stand-alone program or a subroutine as a fully compilable unit. Also, would you please print out the content of "ARRAY_OF_ARRAYS(1)%STRINGS(1)" in the example to confirm that it is similar to '123', as you cite as the successful counterpart?


0 Kudos
OP1
New Contributor III
884 Views

I am not sure I understand your request... the code is complete, as is. It's a minimal reproducer. If you try to compile it an ICE ("Internal Compiler Error") will be issued by the compiler.

0 Kudos
jimdempseyatthecove
Honored Contributor III
854 Views

@Shiquan_Su 

The submitted program in posting 1 is complete. The PROGRAM statement is optional.

See: PROGRAM

PROGRAM

Statement: Identifies the program unit as a main program and gives it a name.

[PROGRAM name]

   [specification-part]

   [execution-part]

[CONTAINS

   internal-subprogram-part]

END[PROGRAM [name]]

...

Description

The PROGRAM statement is optional. ...

Jim Dempsey

0 Kudos
Shiquan_Su
Moderator
824 Views

You are right, I can reproduce the ICE on the code piece. I reported this to the developer. And I will update here when anything comes back.


0 Kudos
Reply