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

Internal compiler error when using derived data type

bbur
Beginner
1,775 Views

Hello,

I recently moved a code from ifc2017 to the most recent ifc2022 version.

I was able to fix some compatibility issues related to the Fortran2018 standard. However the last issue encountered seems to be out of scope. Here is a minimal example that leads to the error:

Module ModuleList
    implicit none
    type list(n)
        integer,len :: n
        integer :: items(n)
    end type list
    contains
        subroutine somefunction( n, myList)
            integer,intent(in) :: n
            type(list(n)) :: myList
        end subroutine somefunction
end Module ModuleList

subroutine somefunction2(n)
    use ModuleList
    implicit none
    integer, intent(in) :: n
    type(list(n)) :: myList  
end subroutine somefunction2

program main
end program main

Is it purely a compiler related issue, or, the code is not correctly written but the error is not caught properly? Unfortunately, my knowledges in Fortran and the use of derived data type are quite limited. The code is compiling fine with ifc2017.

0 Kudos
1 Solution
Barbara_P_Intel
Employee
1,265 Views

This ICE is fixed in the latest compiler release, ifort 2021.9.0 and ifx 2023.1.0. Both compilers are included in oneAPI HPC Toolkit 2023.1.

Please check it out!



View solution in original post

0 Kudos
10 Replies
Steve_Lionel
Honored Contributor III
1,742 Views

Your code is fine - the compiler is in error. I tried the newer ifx compiler, and it was also unhappy (not an ICE, but a complaint of unimplemented feature.) NAG Fortran compiles it without issue (other than remarking on unused variables.)

0 Kudos
Arjen_Markus
Honored Contributor I
1,702 Views

gfortran 10.2.0 also accepts it ;).

0 Kudos
Barbara_P_Intel
Employee
1,732 Views

I filed a bug report, CMPLRIL0-34715, on this ICE.

Thanks for the tip that it used to compile ok. It first starts failing with 19.1.0.



0 Kudos
bbur
Beginner
1,691 Views

@Steve_Lionel @Arjen_Markus 

Thanks for the tests. Haven't thought about switching the compiler. 

 

@Barbara_P_Intel 

Thanks for the report. Is there a way to follow it up?

0 Kudos
Barbara_P_Intel
Employee
1,666 Views

@bbur I'll track the fix and post here when the fix is available.



0 Kudos
bbur
Beginner
1,637 Views

OK, Thanks. I will wait for the fix to validate this topic.

0 Kudos
bbur
Beginner
1,437 Views

Hello,
Any news about this topic ? Is a fix available ?

0 Kudos
Barbara_P_Intel
Employee
1,427 Views

No resolution yet.



0 Kudos
Barbara_P_Intel
Employee
1,266 Views

This ICE is fixed in the latest compiler release, ifort 2021.9.0 and ifx 2023.1.0. Both compilers are included in oneAPI HPC Toolkit 2023.1.

Please check it out!



0 Kudos
bbur
Beginner
944 Views

Hello Barbara,

I checked the recent fix and I confirm that everything is working fine now.

Thank you !

I will close this issue.

 

0 Kudos
Reply