- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
You've found an Internal Compiler Error (ICE), which is a bug in the ifx compiler itself. The crash is triggered by a problematic combination of using a type-bound finalizer along with an unnecessary, explicit interface block for that same finalizer. This redundancy confuses the compiler during the module-linking process, especially when you use the use ... only: bar clause. Your workarounds correctly resolve the issue by removing the redundant declaration, and you should report this bug to Intel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Thomas201Tang Your account looks like a spam account.
Doc (not an Intel employee or contractor)
[CoPilot is a virus]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bug ID is CMPLRLLVM-70660
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Interesting it crashed on ifx on VS
and IFORT with fortcom: Fatal: There has been an internal compiler error (C0000005).

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page