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.4 [regression]

Juergen_R_R
Valued Contributor II
340 Views

The following code, when compiled in two different files, gives an ICE with ifx 2025.0.4, but was working fine in ifx 2024.

ifx -c repro.f90; ifx -c repro_sub.f90

repro_sub.f90(13): error #5623: **Internal compiler error: internal abort** Please report this error along with the circumstances in which it occurred in a Software Problem Report. Note: File and line given may not be explicit cause of this error.
int_out%parents = int_in%parents

Submodule file:

submodule (interactions) interactions_s
  implicit none

contains

  !!! ICE function
  module subroutine interaction_assign (int_out, int_in)
    type(interaction_t), intent(out) :: int_out
    type(interaction_t), intent(in), target :: int_in
    !!! ICE
    if (allocated (int_in%parents)) then
       allocate (int_out%parents (size (int_in%parents)))
       int_out%parents = int_in%parents
    end if
  end subroutine interaction_assign

end submodule interactions_s

Main file:

module interactions
  implicit none
  type :: internal_link_list_t
     private
     integer, dimension(:), allocatable :: link
  end type internal_link_list_t

  type :: interaction_t
     private
     type(internal_link_list_t), dimension(:), allocatable :: parents
  end type interaction_t

  interface assignment(=)
     module procedure interaction_assign
  end interface

  interface
    module subroutine interaction_assign (int_out, int_in)
      type(interaction_t), intent(out) :: int_out
      type(interaction_t), intent(in), target :: int_in
    end subroutine interaction_assign
  end interface
end module interactions

 

3 Replies
Igor_V_Intel
Employee
267 Views

Thank you for sharing a small reproducer for this bug. It is still in the latest build of the compiler. I escalated it to the development team to be fixed.


0 Kudos
Igor_V_Intel
Employee
255 Views

-nostandard-realloc-lhs may help (is a workaround) to avoid this compiler crash


0 Kudos
Juergen_R_R
Valued Contributor II
217 Views

Thanks for the workaround, but the -nostandard-realloc-lhs was sort of trauma around and before 2016/2017. I'm happy not to have to use this anymore. So I'll wait for the (hopefully timely) fix.

0 Kudos
Reply