ifort (IFORT) 12.0.0 20101006 ICE : abstract type and named arguments

ifort (IFORT) 12.0.0 20101006 ICE : abstract type and named arguments

If I create an instance of a type which is an extension of an abstract type using named arguments, I get an ICE. If I create this instance using unnamed arguments, the program compilation is ok. The code is below:

module pointModule implicit none type :: point2d_s real :: x real :: y contains procedure :: compDistToO_s end type point2d_s type, abstract :: pointGen contains procedure ( compDistToOProto ) , deferred :: compDistToO end type pointGen type, extends( pointGen) :: point2d real :: x real :: y contains procedure :: compDistToO => compDist2dToO end type point2d abstract interface function compDistToOProto( self ) result(distance) import :: pointGen class(pointGen) :: self real :: distance end function compDistToOProto end interface contains function compDist2dToO( self ) result(distance) class(point2d) :: self real :: distance distance = sqrt( self%x*self%x + self%y*self%y ) end function compDist2dToO function compDistToO_s(self) result(distance) class(point2d_s) :: self real :: distance distance = sqrt( self%x*self%x + self%y*self%y ) end function compDistToO_s end module pointModule program letest use pointModule implicit none real :: distance, distance_s type(point2d) :: myPoint type(point2d_s) :: myPoint_s myPoint = point2d(x=2.3, y=4.2 ) ! ICE ! myPoint = point2d(2.3, 4.2 ) ! no ICE distance = myPoint%compDistToO() print *, "Distance = ", distance myPoint_s = point2d_s(x=2.3, y=4.2 ) ! no ICE distance_s = myPoint_s%compDistToO_s() print *, "Distance = ", distance_s end program letest 

publicaciones de 3 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

Thank you for reporting this and for the convenient reproducer. I reported thisto Development and will update the post as I learn more about a fix.

(Internal tracking id: DPD200198346)

(Resolution Update on 10/14/2012): This defect is fixed in the Intel® Fortran Compiler XE Update 4 (12.0.4.191 - Linux)

Pardon the delayed update. This defect is fixed in the Intel® Fortran Compiler XE Update 4 (12.0.4.191 - Linux)

Inicie sesión para dejar un comentario.