- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I get the **Internal compiler error: internal abort** with IFX, while IFORT worked fine.
Here is an example code:
line 168 and 169 should be almost equivalent, but the first is fine, the second gives the compiler error.
MODULE myMODULE
IMPLICIT NONE
PRIVATE :: myPrivateLocSubroutine1,myPrivateLocSubroutine2
PUBLIC :: publicSubroutine
type , PUBLIC:: ARR_PROC_POINTER
procedure(myProcedure_int), pointer,nopass :: myFunc
end type ARR_PROC_POINTER
ABSTRACT INTERFACE
SUBROUTINE myProcedure_int(myArray,myInteger,myReal)
IMPLICIT NONE
REAL :: myArray(myInteger)
INTEGER :: myInteger
REAL :: myReal
END SUBROUTINE myProcedure_int
END INTERFACE
INTERFACE publicSubroutine
MODULE PROCEDURE publicSubroutine
END INTERFACE
!
PUBLIC
!
TYPE, public :: tJustASmallerType
REAL :: myReal
INTEGER :: myInt
REAL, ALLOCATABLE :: myArray(:)
procedure(myProcedure_int),pointer,nopass :: myFunc
!
contains
!
END TYPE tJustASmallerType
interface tJustASmallerType
module procedure ConstructorJustASmallerType
end interface tJustASmallerType
!
TYPE, public :: tJustALargerType
REAL :: myReal
INTEGER :: myInt
REAL, ALLOCATABLE :: myArray(:)
procedure(myProcedure_int),pointer,nopass :: myFunc
!
contains
!
END TYPE tJustALargerType
interface tJustALargerType
module procedure ConstructorJustALargerType
end interface tJustALargerType
CONTAINS
function ConstructorJustASmallerType(myArray,myInt,myReal) Result(this)
IMPLICIT NONE
type(tJustASmallerType) :: this
REAL, ALLOCATABLE :: myArray(:)
INTEGER :: myInt
REAL :: myReal
ALLOCATE(this%myArray(myInt))
this%myFunc => myPrivateLocSubroutine1
this%myArray = myArray
this%myInt = myInt
this%myReal = myReal
END FUNCTION ConstructorJustASmallerType
function ConstructorJustALargerType(locFunc,myArray,myInt,myReal) Result(this)
IMPLICIT NONE
type(tJustALargerType), pointer :: this
INTERFACE
SUBROUTINE locFunc(locarray,locint,locreal)
IMPLICIT NONE
!
REAL :: locarray(locint),locreal
INTEGER :: locint
END SUBROUTINE locFunc
END INTERFACE
REAL, ALLOCATABLE :: myArray(:)
INTEGER :: myInt
REAL :: myReal
this%myFunc => locFunc
this%myArray = myArray
this%myInt = myInt
this%myReal = myReal
END FUNCTION ConstructorJustALargerType
SUBROUTINE myPrivateLocSubroutine1(myArray,myInt,myReal)
IMPLICIT NONE
INTEGER :: myInt
REAL :: myReal
REAL :: myArray(myInt)
INTEGER :: i
!
DO i =1,myInt
myArray(myInt+1-i) = i*myReal
ENDDO
END SUBROUTINE myPrivateLocSubroutine1
SUBROUTINE myPrivateLocSubroutine2(myArray,myInt,myReal)
IMPLICIT NONE
INTEGER :: myInt
REAL :: myReal
REAL :: myArray(myInt)
INTEGER :: i
!
DO i =1,myInt
myArray(i) = i*myReal
ENDDO
END SUBROUTINE myPrivateLocSubroutine2
SUBROUTINE publicSubroutine(myArray,myInt,myReal)
IMPLICIT NONE
INTEGER :: myInt
REAL :: myReal
REAL :: myArray(myInt)
INTEGER :: i
!
DO i =1,myInt
myArray(i) = i*myReal
ENDDO
END SUBROUTINE publicSubroutine
END MODULE myMODULE
SUBROUTINE Init(myInt,myReal)
USE myMODULE
IMPLICIT NONE
INTEGER, INTENT(IN) :: myInt
REAL , INTENT(IN) :: myReal
!
TYPE(tJustASmallerType) :: JustASmallerType
TYPE(tJustALargerType) :: JustALargerType
REAL, ALLOCATABLE :: myArray(:)
integer :: i
ALLOCATE(myArray(myInt))
!
DO i = 1, myInt
myArray(i) = i*myReal
ENDDO
!
JustASmallerType = tJustASmallerType(myArray,myInt,myReal)
JustALargerType = tJustALargerType(publicSubroutine, JustASmallerType%myArray,JustASmallerType%myInt,JustASmallerType%myReal) ! works!
JustALargerType = tJustALargerType(JustASmallerType%myFunc, JustASmallerType%myArray,JustASmallerType%myInt,JustASmallerType%myReal) ! this line causes **internal compiler error:internal abort** only with IFX, while iFort works fine.
!
END SUBROUTINE Init
thanks in advance for the support
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Which version of IFX did you use? The 2024.1.0 version of IFX on Windows compiled your code into an object file with /Od, /O1 or /O2, with no error messages.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Which version of IFX did you use? The 2024.1.0 version of IFX on Windows compiled your code into an object file with /Od, /O1 or /O2, with no error messages.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Today I installed the IFX 2024, and it works. The 2023 was the one failing... thanks!

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page