Internal compiler error

Internal compiler error

For lack of a better place to report an internal compiler error: The code below make ifort version 14.0.1 20131010 under OS X 10.9 crash.

MODULE classAbstract

IMPLICIT NONE

TYPE, ABSTRACT :: TAbstract
! No data - merely a placeholder
CONTAINS
PROCEDURE(assignAbstract), DEFERRED, PASS(this) :: assign
GENERIC :: ASSIGNMENT(=) => assign !< Commenting out this line make the code compile
END TYPE TAbstract

ABSTRACT INTERFACE
SUBROUTINE assignAbstract( that, this )
IMPORT :: TAbstract
CLASS(TAbstract), INTENT(in) :: this
CLASS(TAbstract), ALLOCATABLE, INTENT(out) :: that
END SUBROUTINE assignAbstract
END INTERFACE

END MODULE classAbstract

MODULE classExtended

USE classAbstract

IMPLICIT NONE

TYPE, EXTENDS(TAbstract) :: TExtended
REAL :: foo
CONTAINS
PROCEDURE, PRIVATE, PASS(this) :: assign => assignExtended
GENERIC :: ASSIGNMENT(=) => assign
END TYPE TExtended

CONTAINS
SUBROUTINE assignExtended( that, this )
!
CLASS(TExtended), INTENT(in) :: this
CLASS(TAbstract), ALLOCATABLE, INTENT(out) :: that

SELECT TYPE( that )
TYPE IS (TExtended)
that = this
END SELECT

END SUBROUTINE assignExtended

END MODULE classExtended

PROGRAM testit

USE classAbstract
USE classExtended

IMPLICIT NONE

CLASS(TAbstract), ALLOCATABLE :: isotherm

ALLOCATE( TExtended :: isotherm )
isotherm = TExtended( 3.14 )

END PROGRAM testit

2 帖子 / 0 全新
最新文章
如需更全面地了解编译器优化,请参阅优化注意事项

I do not know why you would think there is a better place to report a bug - this forum is IDEAL for reporting bugs!  :)

I have opened a bug report against the compiler.  Thank you for sending this to us.  I will update this thread as we learn more about this bug.

ron

发表评论

登录添加评论。还不是成员?立即加入