- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Steve et al. at Intel,
The code listed below compiles with no errors or warnings using Intel Fortran compiler version 13.1.0.149 even if Fortran 2003/2008 standards checking is turned on. This seems to be a violation of C1277 of Fortran 2003 standard that says:
[plain]
8 12.7 Elemental procedures
9 12.7.1 Elemental procedure declaration and interface
10 An elemental procedure is an elemental intrinsic procedure or a procedure that is defined by an
11 elemental subprogram.
12 An elemental subprogram has the prefix-spec ELEMENTAL. An elemental subprogram is a pure sub
13 program. The PURE prefix-spec need not appear; it is implied by the ELEMENTAL prefix-spec. The
14 following additional constraints apply to elemental subprograms.
15 C1277 All dummy arguments of an elemental procedure shall be scalar dummy data objects and shall
16 not have the POINTER or ALLOCATABLE attribute.
17 C1278 The result variable of an elemental function shall be scalar and shall not have the POINTER or ALLOCATABLE attribute.
[/plain]
Can you please review and follow-up as you think is appropriate? Perhaps it has been fixed in compiler 14, the latest update?
[fortran]
MODULE foo
TYPE t
END TYPE t
CONTAINS
PURE ELEMENTAL SUBROUTINE foo1(x)
TYPE(t), ALLOCATABLE, INTENT(INOUT) :: x
END SUBROUTINE foo1
PURE ELEMENTAL SUBROUTINE foo2(x)
TYPE(t), ALLOCATABLE, INTENT(OUT) :: x
END SUBROUTINE foo2
PURE ELEMENTAL SUBROUTINE foo3(x)
TYPE(t), ALLOCATABLE, INTENT(IN) :: x
END SUBROUTINE foo3
END MODULE foo
[/fortran]
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Note Intel Fortran compiler version 13.1.0.149 correctly throws an error if the dummy argument attribute is POINTER instead of ALLOCATABLE.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In your case, the allocatable object is a scalar (one of your type t).
Line 17 C1278 The result variable of an elemental function shall be scalar and shall not have the POINTER or ALLOCATABLE attribute.
Your program is using elemental subroutine.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jim,
You're referring to item C1278 starting on line 17 that refers to the result variable of an ELEMENTAL function.
Instead it is item C1277 starting on line 15 that applies to my code example. Note it says:
[plain]
15 C1277 All dummy arguments of an elemental procedure shall be scalar dummy data objects and shall
14
16 not have the POINTER or ALLOCATABLE attribute.
[/plain]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for bringing this to our attention. My guess is that it was missed a long time ago when we added allocatable dummy arguments. I will let the developers know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It turns out that this was reported a little while ago and is on the list to be fixed. Issue ID is DPD200247686.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve,
Thanks much for following up on this. Any word on the timing for the fix?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No word. It won't be before the next major release later this year.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This has been fixed for 15.0 Update 2, available now from the Intel Registration Center.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Awesome, thank you.

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