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

catastrophic error: Internal Compiler Error: Ref module: ffe_ccvt.c

V-T
Novice
366 Views

Consider the following minimal working example:

module lib
    type t
        real,allocatable::v(:)
    end type
contains
    type(t)function f(o,i)
        class(t),intent(in)::o
        integer,intent(in)::i
        f=t(REAL(i)*o%v)  ! any function instead of `REAL` can be here; compiles with `f=t(o%v*REAL(i))`
    end
end

program prog
    use lib
end

Compilation of this code with the Intel compiler (ifort 2021.8.0 and ifx 2023.0.0 on Ubuntu 18.04.2 LTS) and without any flags fails with the following output:

test.F90(9): internal error: Please visit 'http://www.intel.com/software/products/support' for assistance.
        f=t(REAL(i)*o%v)  ! any function instead of `REAL` can be here; compiles with `f=t(o%v*REAL(i))`
^
test.F90(9): catastrophic error: Internal Compiler Error: Ref module: ffe_ccvt.c
compilation aborted for m.F90 (code 1)

But changing the order of multiplicands in line 9 solves the problem.

Labels (1)
1 Solution
Barbara_P_Intel
Moderator
339 Views

Good news! Both ifx and ifort compile this reproducer successfully with the compilers that will be released in the spring.

There will be an announcement on this Forum (and others) when it is available.



View solution in original post

0 Kudos
1 Reply
Barbara_P_Intel
Moderator
340 Views

Good news! Both ifx and ifort compile this reproducer successfully with the compilers that will be released in the spring.

There will be an announcement on this Forum (and others) when it is available.



0 Kudos
Reply