- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
learning Fortran I wrote simple code to test deferred bindings and abstract types.
ifort 11.1/073 does not like it : catastrophic error: **Internal compiler error: segmentation violation signal raised**
Is there something I could do on my side ?
Best regards.
Marc
module pointModule
implicit none
type, abstract :: pointGen
contains
procedure ( computeDistanceProto ) , deferred :: computeDistance
end type pointGen
type, extends( pointGen) :: point2d
real :: x,y
contains
procedure :: computeDistance => computeDistance2d
end type point2d
abstract interface
function computeDistanceProto( self ) result(distance)
import :: pointGen
class(pointGen) :: self
real :: distance
end function computeDistanceProto
end interface
contains
function computeDistance2d( self ) result(distance)
class(point2d) :: self
real :: distance
distance = sqrt( self%x*self%x + self%y*self%y )
end function computeDistance2d
end module pointModule
program letest
use pointModule
implicit none
real :: distance
type(point2d) :: monPoint
monPoint = point2d(2.3, 4.2)
distance = monPoint%computeDistance()
end program letest
learning Fortran I wrote simple code to test deferred bindings and abstract types.
ifort 11.1/073 does not like it : catastrophic error: **Internal compiler error: segmentation violation signal raised**
Is there something I could do on my side ?
Best regards.
Marc
module pointModule
implicit none
type, abstract :: pointGen
contains
procedure ( computeDistanceProto ) , deferred :: computeDistance
end type pointGen
type, extends( pointGen) :: point2d
real :: x,y
contains
procedure :: computeDistance => computeDistance2d
end type point2d
abstract interface
function computeDistanceProto( self ) result(distance)
import :: pointGen
class(pointGen) :: self
real :: distance
end function computeDistanceProto
end interface
contains
function computeDistance2d( self ) result(distance)
class(point2d) :: self
real :: distance
distance = sqrt( self%x*self%x + self%y*self%y )
end function computeDistance2d
end module pointModule
program letest
use pointModule
implicit none
real :: distance
type(point2d) :: monPoint
monPoint = point2d(2.3, 4.2)
distance = monPoint%computeDistance()
end program letest
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for reporting this issue. I'll try reproducing and update the thread when I have more information on whether there is a work around.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Additional information :
It looks like the problem is related to the line
monPoint = point2d(2.3, 4.2)
If I replace this line by :
monPoint%x = 2.3 ; monPoint%y=4.2
the compilation is ok, and also the program.
Using gfortran I also have a problem with this line, no ICE but the compilation fails.
Marc
It looks like the problem is related to the line
monPoint = point2d(2.3, 4.2)
If I replace this line by :
monPoint%x = 2.3 ; monPoint%y=4.2
the compilation is ok, and also the program.
Using gfortran I also have a problem with this line, no ICE but the compilation fails.
Marc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for the update. I found the same code change but I wasn't able to post an update. I believe that should be an invalid reference to the extended type, point2d. I haven't received comments from Development yet.
(Internal tracking id: DPD200156821)
(Resolution Update on 11/30/2010): This defect is fixed in the Intel Fortran Composer XE 2011 initial release (12.0.0.084 - Linux)
(Internal tracking id: DPD200156821)
(Resolution Update on 11/30/2010): This defect is fixed in the Intel Fortran Composer XE 2011 initial release (12.0.0.084 - Linux)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Development has already fixed this defect. It was reported in (this) earlier post.
The point2d(2.3, 4.2) reference in the line in question isactually valid.
The fixwill be available in next major releaselater thisyear.I'll update again around that time. Untilthen,theidentified work aroundwill need to be used.
The point2d(2.3, 4.2) reference in the line in question isactually valid.
The fixwill be available in next major releaselater thisyear.I'll update again around that time. Untilthen,theidentified work aroundwill need to be used.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Intel Fortran Composer XE 2011 initial release (12.0.0.084 - Linux) with the fix is available from the Intel Registration Center: https://registrationcenter.intel.com
The test case now compiles successfully.

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