- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The code below compiles with the latest ifx compiler (2025.1.0), but I am not sure it should. The Intel documentation states:
"A dummy argument that is a pointer can be associated only with an actual argument that is a pointer." link
Shouldn't the call to S1 on line 4 be illegal then, since P is not a pointer?
PROGRAM TEST
IMPLICIT NONE
CALL S1(P)
CALL S2(P)
CONTAINS
SUBROUTINE P
IMPLICIT NONE (TYPE, EXTERNAL)
END SUBROUTINE P
SUBROUTINE S1(PROC)
IMPLICIT NONE (TYPE, EXTERNAL)
PROCEDURE(P), POINTER, INTENT(IN) :: PROC
END SUBROUTINE S1
SUBROUTINE S2(PROC)
IMPLICIT NONE (TYPE, EXTERNAL)
PROCEDURE(P) :: PROC
END SUBROUTINE S2
END PROGRAM TEST
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The documentation has not been updated here to correspond with Fortran 2008, which allows a non-pointer to be passed to an INTENT(IN) pointer:
"If the dummy argument does not have the INTENT (IN), the actual argument shall be a pointer. Otherwise, the actual argument shall be a pointer or a valid target for the dummy pointer in a pointer assignment statement. If the actual argument is not a pointer, the dummy pointer becomes pointer associated with the actual argument." F2008 12.5.2.7 Pointer dummy variables
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Steve! @Devorah_H_Intel , this one is for your documentation crew!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
These days it's a crew of one sharing time with the C++ team.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It looks like we caught this documentation error back in March. the issue ID is DOC-13286. I have added your report to the existing bug. We'll see if we can get this done for the next release. Thank you for bringing this to our attention.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No matter how much we try the documentation will remain a century behind reality. Snoopy's Coding Rule 1313

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page