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

ifx internal compiler error with huge()

Jacob_Williams
New Contributor II
663 Views

The following example causes an "error #5623: Internal compiler error: internal abort" with the latest Intel ifx compiler (2024.2) on Windows 10, 64bit, using Visual Studio 2019, both Debug and Release builds:

 

module test 

    use iso_fortran_env, only: wp => real64
    implicit none
    private 
    public :: go

contains 

    subroutine go()
        integer,dimension(:),allocatable :: m
        allocate(m(10))
        m = huge(1.0_wp)
    end subroutine go

end module test

 

4 Replies
V-T
New Contributor I
650 Views

The same error can also be produced with the following minimal example:

 

integer::i(1)
i=huge(0.)
end

 

 

JFH
New Contributor I
580 Views

V-T's 3-line program has i=huge(0.) but huge(0.) is too big to store in the integer i. Changing to i=huge(0) makes the program run.

0 Kudos
V-T
New Contributor I
562 Views

Yes, but the problem is not with the correctness of the code. Internal compiler errors (ICEs) should not happen. If there are some syntax errors, the compiler should catch them with appropriate error messages, not with ICEs. Also, converting `huge(0.)` to an integer isn't a problem for ifx without any compiler flags, because, if you remove `(1)` in the first line, the code will compile without any problems.

Devorah_H_Intel
Moderator
457 Views

Thank you for reporting the ICE to us. I have been able to reproduce it internally, and the case has been escalated to compiler engineering for a fix. 

0 Kudos
Reply