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

ICE: Empty array in allocatable component of derived type constructor

jwmwalrus
New Contributor II
1,684 Views

Hi.

The following code causes an ICE with both ifort and ifx (but compiles just fine with gfortran):

module mod1
    implicit none

    type :: address
        character(:), allocatable :: line1
    end type

    type :: user
        character(:), allocatable :: username
        type(address), allocatable :: addresses(:)
    end type

    type(user) :: root
contains
    subroutine init
        root = user('root', [address ::])
    end subroutine
end module

 

Compiler versions:

ifx version 2023.1.0

ifort version 2021.9.0

3 Replies
Barbara_P_Intel
Employee
1,666 Views

@jwmwalrus, kudos for reporting this ICE! I filed a bug report, CMPLRLLVM-48558. Will let you know when a fix is available.



0 Kudos
Barbara_P_Intel
Employee
1,565 Views

@jwmwalrus, the ICE is melted for both ifx and ifort with the compilers that were released this week. Please try them out!



0 Kudos
jwmwalrus
New Contributor II
1,551 Views

Hi.

Thanks for the follow-up.

Yes, I can confirm that with the latest version the ICE is gone.

Thanks again.

0 Kudos
Reply