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

ice with C_LOC

Honored Contributor III

I had an ICE with a submodule with a few thousand lines in it which had me scratching my head for a while to find he problem. The problem is C_LOC not being declared in icey() which causes the ICE. In the original I had implicit none (external ) which should have raised a non declared error but didn't as it iced instead. I removed that as it is not required for the reproducer for the ICE. Submodule is also not needed. Could someone test this code on the latest or BETA compiler please as if it still gives an ICE. I will raise a ticket on it if so. 

The valid presence of a declaration of C_LOC in subroutine fred is essential for the ICE BTW. 

C:\test>type icey.f90

module mice
        subroutine fred(J)
            use, intrinsic :: iso_c_binding, only: c_loc
            integer( INT_PTR_KIND() ), intent(out) :: J
            J = transfer( C_LOC(gchar), J )
        end subroutine fred
        subroutine icey()
            !use, intrinsic :: iso_c_binding, only: c_loc
            integer( INT_PTR_KIND() ) :: hret
            character(256)            :: gchar
            hret = transfer( C_LOC(gchar), hret )
    end subroutine icey
end module mice

C:\test>ifort -c icey.f90
Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on IA-32, Version Build 20200306
Copyright (C) 1985-2020 Intel Corporation.  All rights reserved.

icey.f90(13): catastrophic error: **Internal compiler error: internal abort** 
Please report this error along with the circumstances in which it occurred in 
a Software Problem Report.  Note: File and line given may not be explicit cause of this error.
compilation aborted for icey.f90 (code 1)



0 Kudos
2 Replies
Honored Contributor III

I can reproduce it in 19.1.1 but not 19.1.2, which is the current version. (The beta is ok as well.)

0 Kudos
Honored Contributor III

If that is the case Steve I guess it is fixed so no further action is needed.

0 Kudos