Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29286 Discussions

ifort 11.1/073 : catastrophic error: **Internal compiler error: segmentation violation signal raised**

mg13
Beginner
841 Views
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

0 Kudos
5 Replies
Kevin_D_Intel
Employee
841 Views
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.
0 Kudos
mg13
Beginner
841 Views
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
0 Kudos
Kevin_D_Intel
Employee
841 Views
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)
0 Kudos
Kevin_D_Intel
Employee
841 Views
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.
0 Kudos
Kevin_D_Intel
Employee
841 Views

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.

0 Kudos
Reply