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

/gen-interfaces related error

Jon_D
New Contributor II
852 Views
Hi,

I have a subroutine that USEs two modules where two UDTs are defined:

MODULE A
TYPE TypeA
!definitions here
END TYPE TypeA
END MODULE

MODULE B
TYPE TypeB
!defintions here
END TYPE TypeB
END MODULE

SUBROUTINE MySub(AA,BB)
USE A
USE B
IMPLICIT NONE
TYPE(TypeA),ALLOCATABLE::AA(:)
TYPE(TypeB),ALLOCATABLE::BB(:)

!Code here

END SUBROUTINE MySub


In the main program that calls MySub:

PROGRAM MAIN
USE A
USE B
IMPLICIT NONE

INTERFACE
SUBROUTINE MySub
USE A
USE B
IMPLICIT NONE
TYPE(TypeA),ALLOCATABLE::AA(:)
TYPE(TypeB),ALLOCATABLE::BB(:)
END SUBROUTINE MySub
END INTERFACE

!Code here

END


Now, when /gen-interface option is turned off the code compiles fine. When /gen-interface option is on I get an error that says "There is a conflict between local interface block and external interface block. [AA]". Can anyone explain what the possible cause of this error might be and why I get this error for AA but not BB?

The above code sample is just to explain the problem. The actual code and interface blocks are much more complicated. I checked both MODULE A and MODULE B to see if I can find any structural differences that may explain why I get this error only for AA; I couldn't find anything.

Thanks for any help in advance.
Jon

0 Kudos
3 Replies
Steven_L_Intel1
Employee
852 Views
Compiler version? I don't see this with 10.0.027.
0 Kudos
Jon_D
New Contributor II
852 Views
Sorry! Compiler version is 10.0.027 with Visual Studio 2003.

Jon
0 Kudos
Steven_L_Intel1
Employee
852 Views
Can you reproduce the problem with the code you posted, filling in a component into each of the derived types? I can't.
0 Kudos
Reply