Showing results for 
Search instead for 
Did you mean: 

Internal compiler error using BLOCK and PROCEDURE interface

I'm using Intel Fortran Version Build 20160415 on Windows 10 (32-bit).

This took some time to produce a minimal code that reproduces the issue. The module below, when compiled with:

ifort.exe /debug:full /dll testmod.f90

Produces the error: "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."

module testmod
    implicit none
    abstract interface
        function func_ptr_interface(x) result(y)
            integer :: x
            integer :: y
        end function func_ptr_interface
    end interface
    subroutine test(func_ptr)
        procedure(func_ptr_interface) :: func_ptr
            real :: x
        end block
    end subroutine test

end module testmod

This error does not occur if I take out the BLOCK statement, or if I move the INTERFACE into a different MODULE, or if I just remove the dummy argument "func_ptr" from "test", or if I don't compile with "/debug:full".

My workaround is to move the INTERFACE into another MODULE. I suppose this is a bug report, but others may find this useful...

As an aside, I started down this path because in the actual project I'm also using /warn:unused, and the compiler was warning me about an unused return value / result from a function, even though I was clearly using it. I started reducing the code's complexity to isolate the problem, then the internal compiler error came up. But, moving the INTERFACE to another MODULE also fixed the erroneous warning, so I suspect they are related.

0 Kudos
1 Reply

I can reproduce this in 16.0.3 but not 17.0.0, so it looks as if it was already fixed.

0 Kudos