- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In the snippet below, I believe the compiler is missing to catch intent(INOUT) vs Intent(IN) in subroutine Inspect.
Note that if the commented calls are used then there is a compile-time error. Thus, only if I am using type bound function syntax then the error goes undetected.
Abhi
==================
Note that if the commented calls are used then there is a compile-time error. Thus, only if I am using type bound function syntax then the error goes undetected.
Abhi
==================
[fortran]Module OM
Implicit None
Type newCar
Integer :: n
Contains
Procedure :: Check
Procedure :: Inspect
Procedure :: Test
End Type newCar
Contains
Subroutine Inspect(Car)
Class(newCar), Intent(IN) :: Car
Integer :: m
!Call Check(Car)
!Call Car%Check
!m = Test(Car)
m = Car%Test()
End Subroutine Inspect
Subroutine Check(Car)
Class(newCar), Intent(INOUT) :: Car
End Subroutine Check
Function Test(Car) Result(i)
Integer :: i
Class(newCar), Intent(INOUT) :: Car
i = 0
End Function Test
End Module OM[/fortran]
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Abhi,
Thanks for bringing this to our attention. I have escalated it to the developers and will let you know when it is fixed.
Thanks for bringing this to our attention. I have escalated it to the developers and will let you know when it is fixed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This issue will be fixed in Update 3 to Intel Visual Fortran Composer 2011.
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