This may or may not be related to this other ICE.
module test_mod
ABSTRACT INTERFACE
PURE REAL FUNCTION INTERPOLATION_FUNCTION(ARG)
REAL, INTENT(IN) :: ARG
END FUNCTION INTERPOLATION_FUNCTION
END INTERFACE
CONTAINS
!> brief Returns a pointer to the function described by the text string
FUNCTION FIND_INTERPOLATION_FUNCTION(DESCRIPTION)
IMPLICIT NONE
! Arguments
CHARACTER(LEN=*), INTENT(IN) :: DESCRIPTION
! Result
PROCEDURE(INTERPOLATION_FUNCTION), POINTER :: FIND_INTERPOLATION_FUNCTION
! Private variables
! Start work
SELECT CASE (TRIM(DESCRIPTION))
CASE ('SINC')
FIND_INTERPOLATION_FUNCTION => SINC
CASE DEFAULT
WRITE(*,'(2A)') '**ERROR(FIND_INTERPOL_FUNCTION): could not work out what function you were looking for. ', TRIM(DESCRIPTION)
STOP 'Fatal error in FIND_INTERPOL_FUNCTION'
END SELECT
END FUNCTION FIND_INTERPOLATION_FUNCTION
PURE REAL FUNCTION SINC(ARG)
IMPLICIT NONE
REAL, INTENT(IN) :: ARG
! Private variables
REAL :: ARG2
! Start work
ARG2 = ARG
IF (ABS(ARG2) .LE. 1.0E-6) THEN
SINC = 1.0
ELSE
SINC = SIN(ARG2)/ARG2
ENDIF
END FUNCTION SINC
end module test_mod
program hello
use test_mod
implicit none
end program hello
Compiling this with ifort 11.1.064 gives this:
% ifort -c helloworld.f90 0_12032 : 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 helloworld.f90 (code 3)
I'm not completely sure whether what I am doing is legal fortran - this is the first time I am writing a function where the result is a pointer to a function defined by an abstract interface. But either way, an ICE is not nice.
Do let me know if this is not legal Fortran - thanks.


