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

ICE of ifx 2024.0.2 due to operator overloading

V-T
New Contributor I
572 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
544 Views

The bug ID on this is CMPLRLLVM-56083


View solution in original post

0 Kudos
2 Replies
Ron_Green
Moderator
550 Views

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

 

0 Kudos
Ron_Green
Moderator
545 Views

The bug ID on this is CMPLRLLVM-56083


0 Kudos
Reply