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

ICE of ifx 2024.0.2 due to operator overloading

V-T
New Contributor I
1,218 Views

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.

Labels (2)
0 Kudos
1 Solution
Ron_Green
Moderator
206 Views

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!

View solution in original post

0 Kudos
3 Replies
Ron_Green
Moderator
1,196 Views

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

 

0 Kudos
Ron_Green
Moderator
1,190 Views

The bug ID on this is CMPLRLLVM-56083


0 Kudos
Ron_Green
Moderator
207 Views

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!

0 Kudos
Reply