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

ICE of ifx 2024.0.2 due to operator overloading

V-T
新規コントリビューター I
1,845件の閲覧回数

Consider the following minimal example:

 

module lib
    interface operator(//)
        procedure f
    end interface
contains
    function f(c,i)
        character(len=*),intent(in)::c
        integer,intent(in)::i
        character(len=:),allocatable::f
        character(len=12)::t
        write(t,*)i
        f=c//t
    end
end

program prog
    use lib
    character(len=42)::c
    c=''!&
        //''//42
end

 

Compilation of this code with ifx 2024.0.2 (on Ubuntu 18.04) fails with the message `error #5633: **Internal compiler error: segmentation violation signal raised**`. The reason for the error is a syntax error in line 19: a missing line continuation character `&`. Removing the comment character `!` in this line will fix the issue. However, I don't think that the compiler should fail with an ICE. I suppose, this happens due to the overloading of the concatenation operator `//` and using it in an expression with a line continuation.

ラベル(2)
0 件の賞賛
1 解決策
Ron_Green
モデレーター
833件の閲覧回数

We have a fix for this.  It is scheduled for the 2025.3 Update release this fall. THank you for sending this to us so we can improve our compiler!

元の投稿で解決策を見る

3 返答(返信)
Ron_Green
モデレーター
1,823件の閲覧回数

I will open a bug report.  Thank you for sending this to us!

 

Ron_Green
モデレーター
1,817件の閲覧回数

The bug ID on this is CMPLRLLVM-56083


Ron_Green
モデレーター
834件の閲覧回数

We have a fix for this.  It is scheduled for the 2025.3 Update release this fall. THank you for sending this to us so we can improve our compiler!

返信