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

Internal Compiler Error with IFX 2024.2.0 when optimizations enabled

P-W
Novice
709 Views

This is a reproducer for the issue, greatly simplified from the full context where the issue was observed.  The issue only appears when optimizations (-O1, -O2 or -O3) are enabled.

Command: "ifx -O1 ice001.F90"
Version: 2024.2.0 Build 20240602
Error:  "ice001_v7.F90(34): 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.
call move_alloc(temp_b, my_b%another_b)
----^"


program ice001
    implicit none

    type :: A
        integer :: x
        integer :: y
    end type

    type, extends(A) :: A2
        integer :: z
    end type

    type :: B
        class(A), allocatable :: an_a
        type(B), allocatable :: another_b
    end type

    type(A2), allocatable :: my_a2
    type(B), allocatable :: my_b
    type(B), allocatable :: temp_b

    allocate(my_a2)
    my_a2%x = 10
    my_a2%y = 20
    my_a2%z = 30

    allocate(temp_b)
    call move_alloc(my_a2, temp_b%an_a)

    allocate(my_b)

    ! The following line results in **Internal compiler: internal abort**
    ! if compiled with -O1 or -O2 or -O3 but not with -O0
    call move_alloc(temp_b, my_b%another_b)

    write(*,*) "my_b%another_b%a_comp%x:", my_b%another_b%an_a%x
    write(*,*) "my_b%another_b%a_comp%y:", my_b%another_b%an_a%y

    select type(out_a => my_b%another_b%an_a)
        type is (A2)
            write(*,*) "my_b%another_b%a_comp%z:", out_a%z
    end select

end program ice001

 

1 Solution
Devorah_H_Intel
Moderator
444 Views

This one will be fixed in the upcoming 2025.0 ifx release. 

View solution in original post

0 Kudos
3 Replies
jimdempseyatthecove
Honored Contributor III
676 Views

Great problem report.

Jim Dempsey

0 Kudos
Devorah_H_Intel
Moderator
594 Views

Thank you for your report. This case is now escalated to compiler engineering for a fix. 

0 Kudos
Devorah_H_Intel
Moderator
445 Views

This one will be fixed in the upcoming 2025.0 ifx release. 

0 Kudos
Reply