Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29264 ディスカッション

Reproducer for an ifx ICE

zjibben
初心者
200件の閲覧回数

I'm triggering an interesting ICE with ifx (tested 2023.2 through 2025.2). The issue is some edge case combination of using parts of a module which contain a type with a finalizer exposed through an interface block. The reproducer has only declarations, nothing executable, and can be sidestepped with some interesting changes (commented below).

 

This is some simplified code out of AMReX as well as some of my own code depending on it.

 

! ifx -c ice.f90 -o ice.o
! tested triggering ICE with ifx 2023.2 through 2025.2.

module bar_type

  implicit none
  private

  public :: bar_destroy ! removing this line sidesteps the ICE

  type, public :: bar
  contains
    final :: bar_destroy
  end type bar

  ! removing this block sidesteps the ICE
  interface bar_destroy
    module procedure bar_destroy
  end interface bar_destroy

contains

  subroutine bar_destroy(this)
    type(bar), intent(inout) :: this
  end subroutine

end module bar_type


module foo_type

  implicit none

  type :: foo
  contains
    procedure :: f
  end type

contains

  subroutine f(this, x)
    ! using the entire bar_type module (no "only") sidesteps the ICE
    use bar_type, only: bar
    class(foo), intent(in) :: this
    type(bar), intent(in) :: x
  end subroutine

end module foo_type

 

0 返答(返信)
返信