Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29004 Discussions

bug in 11.1 with PROCEDURE in TYPE declarations

konstantinos
Beginner
474 Views
[cpp]!=================================================================================
!  TestFile.f90
!
!   By Konstantinos, last modified 18/12/09
!=================================================================================

!============================================================================
!           S U B R O U T I N E   M O D U L E S					            |
!============================================================================

MODULE SmallObjectDerDataTypes

IMPLICIT NONE

TYPE SmallObject
	
	REAL(KIND=8),DIMENSION(:),POINTER:: RealParameter			
	
END TYPE SmallObject

END MODULE SmallObjectDerDataTypes


!============================================================================


MODULE ErrorObjectDerDataTypes

IMPLICIT NONE

TYPE ErrorObject
	
	INTEGER(KIND=4):: IntegerParameter			
	
END TYPE ErrorObject

END MODULE ErrorObjectDerDataTypes


!============================================================================


MODULE BigObjectDerDataTypes

USE SmallObjectDerDataTypes

IMPLICIT NONE


TYPE BigObjectProcedures
	REAL(KIND=8),DIMENSION(:),POINTER:: RealParameter
	PROCEDURE(BigObjectParentMethodAbstract),POINTER,NOPASS:: ParentMethod       
END TYPE BigObjectProcedures


TYPE,EXTENDS(SmallObject):: BigObject
	TYPE(BigObjectProcedures):: Proc
END TYPE BigObject


ABSTRACT INTERFACE
	SUBROUTINE BigObjectParentMethodAbstract(DV, ErrDV)

		USE SmallObjectDerDataTypes
		USE ErrorObjectDerDataTypes

		IMPLICIT NONE

		CLASS(SmallObject),INTENT(INOUT):: DV
		TYPE(ErrorObject),INTENT(INOUT):: ErrDV

	END SUBROUTINE BigObjectParentMethodAbstract  
END INTERFACE  

END MODULE BigObjectDerDataTypes


!============================================================================


MODULE FamilyObjectDerDataTypes

	USE BigObjectDerDataTypes	
	USE SmallObjectDerDataTypes
	USE ErrorObjectDerDataTypes

END MODULE FamilyObjectDerDataTypes


!============================================================================
!============================================================================
!============================================================================

!============================================================================
!           S U B R O U T I N E   C O D E S						            |
!============================================================================

MODULE InnerSubroutineInterface

INTERFACE
	SUBROUTINE InnerSubroutine(DV, ErrDV)

			USE ErrorObjectDerDataTypes
			USE FamilyObjectDerDataTypes

			IMPLICIT NONE

			TYPE(BigObject),INTENT(INOUT):: DV
			TYPE(ErrorObject),INTENT(INOUT):: ErrDV

	END SUBROUTINE InnerSubroutine
END INTERFACE

END MODULE InnerSubroutineInterface


!============================================================================


SUBROUTINE InnerSubroutine(DV, ErrDV)

		USE ErrorObjectDerDataTypes
		USE FamilyObjectDerDataTypes

		IMPLICIT NONE

		TYPE(BigObject),INTENT(INOUT):: DV
		TYPE(ErrorObject),INTENT(INOUT):: ErrDV

END SUBROUTINE InnerSubroutine


!============================================================================


MODULE MainSubroutineInterface

INTERFACE
	SUBROUTINE MainSubroutine(DV, ErrDV)

			USE ErrorObjectDerDataTypes
			USE FamilyObjectDerDataTypes

			IMPLICIT NONE

			TYPE(BigObject),INTENT(INOUT):: DV
			TYPE(ErrorObject),INTENT(INOUT):: ErrDV

	END SUBROUTINE MainSubroutine
END INTERFACE

END MODULE MainSubroutineInterface


!============================================================================


SUBROUTINE MainSubroutine(DV, ErrDV)

		USE ErrorObjectDerDataTypes
		USE FamilyObjectDerDataTypes		
		USE InnerSubroutineInterface

		IMPLICIT NONE

		TYPE(BigObject),INTENT(INOUT):: DV
		TYPE(ErrorObject),INTENT(INOUT):: ErrDV

		CALL InnerSubroutine(DV = DV, ErrDV = ErrDV)

END SUBROUTINE MainSubroutine
-----------
Hi,
The piece of FORTRAN code above will fail to compile with Intel Visual Fortran 11.1.051 [IA-32]


The error message given is:

C:Documents and Settingsc101731My DocumentsVisual Studio 2005ProjectsEVA Greater ProjectEVA Source CodePerformance ModuleTestFile.f90(169): internal error: Please visit 'http://www.intel.com/software/products/support' for assistance.

CALL InnerSubroutine(DV = DV, ErrDV = ErrDV)

[ Aborting due to internal error. ]

compilation aborted for C:Documents and Settingsc101731My DocumentsVisual Studio 2005ProjectsEVA Greater ProjectEVA Source CodePerformance ModuleTestFile.f90 (code 1)




Removing the following line will fix the problem, but that is the important bit I require from the code:

PROCEDURE

(BigObjectParentMethodAbstract),POINTER,NOPASS:: ParentMethod

There may be a clash because of the use of the "USE FamilyObjectDerDataTypes"
in both within "SUBROUTINE InnerSubroutine" and
within "SUBROUTINE MainSubroutineInterface"
Is this a bug with the compiler?Is the particular PROCEDURE feauture not supported yet?
I need to use this kind of structure i.e. MainSubroutine, and Inner Subroutine so are
there any potential work-arounds with this, to both keep the current structure and also be able to have the PROCEDURE
component in the derived data type declaration to bind subroutines to the object.
Kind Regards
Konstantinos
[/cpp]
0 Kudos
4 Replies
Lorri_M_Intel
Employee
474 Views
I took your example program above and compiled it with the 11.1 Update 4 compiler (which I believe is now available?) and it compiled successfully.

We fixed some type-bound procedure problems in that release, and it looks like yours was one of them.

Good news for a Friday!

- Lorri
0 Kudos
konstantinos
Beginner
474 Views
I took your example program above and compiled it with the 11.1 Update 4 compiler (which I believe is now available?) and it compiled successfully.

We fixed some type-bound procedure problems in that release, and it looks like yours was one of them.

Good news for a Friday!

- Lorri

I donwloaded the evaluation version of the Intel fortran compiler
for windows (if that makes a difference) on the 17th Dec 2009 i.e. justyesterday.
Theversion number was 11.1.0.51
I just checked the website for an updateversion -
Current status is11.1 update 4 with exact version number being11.1.054.
Wasthat the version you used for compiling the code?
I'll try installing an evaluation copy of .054to see if that makes the difference.

I compile with the following options:
/nologo /debug:full /Od /gen-interfaces /warn:interfaces
/module:"Debug" /object:"Debug" /traceback /check:bounds /libs:static /threads /dbglibs /c

I'll post a reply if I get this working with .054.
0 Kudos
Steven_L_Intel1
Employee
474 Views

11.1.054 is Update 4. 11.1.051 is Update 3.
0 Kudos
konstantinos
Beginner
474 Views

11.1.054 is Update 4. 11.1.051 is Update 3.

Hi,

I tested it with 11.1.054 (Update) and it worked fine.

Thanks for the feedback

Konstantinos
0 Kudos
Reply