- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Compiler version? I don't see this with 10.0.027.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry! Compiler version is 10.0.027 with Visual Studio 2003.
Jon
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you reproduce the problem with the code you posted, filling in a component into each of the derived types? I can't.
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