(j3.2006) C1296 in 14-007r1 (concerning pure subprograms), and 16.6.7p1(12)
Malcolm Cohen
malcolm
Mon Jun 2 02:50:32 EDT 2014
>Item (6) in C1296 is
>
> (6) as an actual argument corresponding to a dummy argument with
> INTENT(OUT) or INTENT(INOUT) or with the POINTER attribute.
>
>16.6.7p1(12) is
>
> (12) as an actual argument corresponding to a dummy argument with
> INTENT(OUT) or INTENT (INOUT),
>
>Should 16.6.7p1(12) include "or with the POINTER attribute"
No. C1296 is doing something noticably stronger than 16.6.7 (obviously since
applying 16.6.7 is only one of its effects).
> or maybe "or
>with the POINTER attribute if the actual argument is not a pointer"?
No. This (ptr dummy nonptr actual) is effectively the same as unspecified
intent, which deliberately does not appear in 16.6.7.
>Item (4) in C1296 uses "pointer component at any level of component
>selection". Item (5) uses "has an ultimate pointer component". Should
>these be the same?
Yes. Item (4) has the correct formulation. This only affects pointer
components within an allocatable component.
>C1296 needs an additional item:
>
> (7) as the actual argument to the function C_LOC from the intrinsic
> module ISO_C_BINDING
Already prohibited since C_LOC is not pure.
(Note: What's gone wrong here is the bogus assertion in F2008 that C_PTR does
not contain a pointer component. But since C_PTR in fact effectively does have
a pointer component, that means that to prevent pointer violations of the purity
rules we have to continue to forbid C_LOC et al. Or fix the bogus assertion.)
>We maybe need a paragraph (can't be a constraint) that prohibits
>invoking the C_F_POINTER subroutine if the value of the CPTR argument is
>the C address of an object specified in the introductory paragraph of
>C1296.
Already prohibited since C_F_POINTER is not pure.
>Should pointer association context (16.6.8) be in the list in C1296, or
>is it OK to change the pointer association status of a host associated
>pointer in a pure subprogram?
No (16.6.7 is a proper superset of 16.6.8) and No it would not be ok (but is
already prohibited).
Cheers,
--
................................Malcolm Cohen, Nihon NAG, Tokyo.
More information about the J3
mailing list