- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

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