- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is a drastically pared version of the code posted recently by benji1986, "Internal Compiler Error":
attempted:
[fortran]module parameters
implicit none
integer :: ncon
end module parameters
module jacksort
implicit none
abstract interface
pure function error_template ( x )
use parameters, only: ncon
real, dimension(0:, 0:), intent(in) :: x
real, dimension(ncon) :: error_template
end function error_template
end interface
procedure(error_template), pointer :: errorfunction => null()
contains
subroutine Error ( cset )
use parameters, only: ncon
real, dimension(0:, 0:), intent(inout) :: cset
cset(1:ncon, ncon+1) = errorfunction(cset(0:ncon, 0:ncon))
end subroutine Error
end module jacksort
[/fortran] Versions 11.1.070 and 12.0.2 of the Windows Ifort compiler, 32-bit and 64-bit, give an ICE when compilation is attempted:
[bash]Intel Visual Fortran Intel 64 Compiler XE for applications running on Intel 64, Version 12.0.2.154 Bu ild 20110112 Copyright (C) 1985-2011 Intel Corporation. All rights reserved. 0_12307 : catastrophic error: **Internal compiler error: internal abort** Please report this error along with the circ umstances in which it occurred in a Software Problem Report. Note: File and line given may not be explicit ca use of this error. compilation aborted for jack.f90 (code 1) [/bash]
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks - escalated as issue DPD200167044.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks.
It's worth noting that if you remove the dependency from the interface, like this:
Ben
It's worth noting that if you remove the dependency from the interface, like this:
[fortran] abstract interface
pure function error_template ( x )
real, dimension(0:, 0:), intent(in) :: x
real, dimension(10) :: error_template
end function error_template
end interface[/fortran] then it will compile with no problems.Ben
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Since you pull in wp and ncon at the module level, you may use them in the abstract interfaces using the import feature of F2003, instead of USE statements in the interfaces:
[fortran] abstract interface
pure real(wp) function error_template1 ( x )
import :: wp
real(wp), dimension(0:), intent(in) :: x
end function error_template1
end interface
abstract interface
pure function error_template2 ( x )
import :: wp, ncon
real(wp), dimension(0:, 0:), intent(in) :: x
real(wp), dimension(ncon) :: error_template2
end function error_template2
end interface
[/fortran] With these modifications, the file jacksort.f90 (in your posted sources.tar.gz) gets compiled without errors.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, the change mecej4 describes is the correct workaround.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This problem has been fixed for a future major compiler version. In the meantime, the workaround suggested should be used.
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