- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
!=================================================================================
! TestFile.f90
!
! By Konstantinos, last modified 19/12/09
!=================================================================================
MODULE TestParentObjectDerDataTypes
IMPLICIT NONE
TYPE TestParentObject
REAL(KIND=8),DIMENSION(:),POINTER:: RealParameter
END TYPE TestParentObject
END MODULE TestParentObjectDerDataTypes
!============================================================================
MODULE TestExtendedObjectDerDataTypes
USE TestParentObjectDerDataTypes
IMPLICIT NONE
TYPE,EXTENDS(TestParentObject):: TestExtendedObject
INTEGER(KIND=4):: IntegerParameter
END TYPE TestExtendedObject
END MODULE TestExtendedObjectDerDataTypes
!============================================================================
MODULE TestSubroutineInterface
INTERFACE
SUBROUTINE TestSubroutine
IMPLICIT NONE
END SUBROUTINE TestSubroutine
END INTERFACE
END MODULE TestSubroutineInterface
!============================================================================
SUBROUTINE TestSubroutine
USE TestParentObjectDerDataTypes
USE TestExtendedObjectDerDataTypes
IMPLICIT NONE
TYPE(TestExtendedObject),TARGET:: ExtObjPtr
CLASS(TestParentObject),POINTER:: ParObjPtr
ParObjPtr => ExtObjPtr
END SUBROUTINE TestSubroutine
!============================================================================
PROGRAM Test
USE TestSubroutineInterface
IMPLICIT NONE
CALL TestSubroutine
END PROGRAM Test
--------------------------------
The following piece of code will compile fine under version 11.1 Update 4 (11.1.054) but will give
the followingerror at runtime:
forrtl: severe (157): Program Exception - access violation
Image PC Routine Line Source
Test.exe 0040101A _TESTSUBROUTINE 60 TestFile02.f90
Test.exe 00401095 _MAIN__ 72 TestFile02.f90
Test.exe 004A2E53 Unknown Unknown Unknown
Test.exe 00447083 Unknown Unknown Unknown
Test.exe 00446E4D Unknown Unknown Unknown
kernel32.dll 7C816FE7 Unknown Unknown Unknown
The code is similar to the examplefrom
ISO/IEC JTC1/SC22/WG5 N1579
The New Features of Fortran 2003
John Reid, WG5 Convener
section 2.12 pp.14
Are there any known workarounds to get a class pointer to point at a type extension?
Konstantinos
! TestFile.f90
!
! By Konstantinos, last modified 19/12/09
!=================================================================================
MODULE TestParentObjectDerDataTypes
IMPLICIT NONE
TYPE TestParentObject
REAL(KIND=8),DIMENSION(:),POINTER:: RealParameter
END TYPE TestParentObject
END MODULE TestParentObjectDerDataTypes
!============================================================================
MODULE TestExtendedObjectDerDataTypes
USE TestParentObjectDerDataTypes
IMPLICIT NONE
TYPE,EXTENDS(TestParentObject):: TestExtendedObject
INTEGER(KIND=4):: IntegerParameter
END TYPE TestExtendedObject
END MODULE TestExtendedObjectDerDataTypes
!============================================================================
MODULE TestSubroutineInterface
INTERFACE
SUBROUTINE TestSubroutine
IMPLICIT NONE
END SUBROUTINE TestSubroutine
END INTERFACE
END MODULE TestSubroutineInterface
!============================================================================
SUBROUTINE TestSubroutine
USE TestParentObjectDerDataTypes
USE TestExtendedObjectDerDataTypes
IMPLICIT NONE
TYPE(TestExtendedObject),TARGET:: ExtObjPtr
CLASS(TestParentObject),POINTER:: ParObjPtr
ParObjPtr => ExtObjPtr
END SUBROUTINE TestSubroutine
!============================================================================
PROGRAM Test
USE TestSubroutineInterface
IMPLICIT NONE
CALL TestSubroutine
END PROGRAM Test
--------------------------------
The following piece of code will compile fine under version 11.1 Update 4 (11.1.054) but will give
the followingerror at runtime:
forrtl: severe (157): Program Exception - access violation
Image PC Routine Line Source
Test.exe 0040101A _TESTSUBROUTINE 60 TestFile02.f90
Test.exe 00401095 _MAIN__ 72 TestFile02.f90
Test.exe 004A2E53 Unknown Unknown Unknown
Test.exe 00447083 Unknown Unknown Unknown
Test.exe 00446E4D Unknown Unknown Unknown
kernel32.dll 7C816FE7 Unknown Unknown Unknown
The code is similar to the examplefrom
ISO/IEC JTC1/SC22/WG5 N1579
The New Features of Fortran 2003
John Reid, WG5 Convener
section 2.12 pp.14
Are there any known workarounds to get a class pointer to point at a type extension?
Konstantinos
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Any suggestions on this???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I apologize for not responding earlier.
This bug is triggered by having /gen-interface enabled. It appears to be the same one reported here and is fixed for Update 5, currently planned for the second week of February. As a workaround, disable "Generate Interface Blocks" and "Check Routine Interfaces" under Diagnostics/

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