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

Internal compiler error when using derived data type

bbur
ビギナー
2,732件の閲覧回数

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 件の賞賛
1 解決策
Barbara_P_Intel
従業員
2,222件の閲覧回数

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!



元の投稿で解決策を見る

10 返答(返信)
Steve_Lionel
名誉コントリビューター III
2,699件の閲覧回数

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.)

Arjen_Markus
名誉コントリビューター II
2,659件の閲覧回数
Barbara_P_Intel
従業員
2,689件の閲覧回数

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.



bbur
ビギナー
2,648件の閲覧回数

@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?

Barbara_P_Intel
従業員
2,623件の閲覧回数

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



bbur
ビギナー
2,594件の閲覧回数

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

bbur
ビギナー
2,394件の閲覧回数

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

Barbara_P_Intel
従業員
2,384件の閲覧回数

No resolution yet.



Barbara_P_Intel
従業員
2,223件の閲覧回数

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!



bbur
ビギナー
1,901件の閲覧回数

Hello Barbara,

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

Thank you !

I will close this issue.

 

返信