(j3.2006) Need an interp for this?
Malcolm Cohen
malcolm
Fri Aug 19 00:22:54 EDT 2011
No interp is required.
>module testr_m
> type :: ty
> integer, allocatable :: l2p(:)
> end type ty
>contains
> subroutine testr(d)
> type (ty), intent(inout) :: d ! Provides various options,
> associate(l2p=>d%l2p)
> allocate (d%l2p(4), stat=i)
...
>the "allocate" statement ought to be disallowed.
Not so. It defines the variable I with a processor-dependent positive value.
>There's nothing in 8.1.3 to prohibit it.
Standard says an allocatable object has to be unallocated here.
>There's also nothing that says d%l2p has to be allocated when the
>"associate" statement is executed.
See 16.5.1.6 Construct association.
>We consciously modeled the associate construct on argument association,
>but we have apparently left out several of the important restrictions on
>arguments.
Apparently not. Some of the more obscure ones might be harder to extract
though.
Cheers,
--
................................Malcolm Cohen, Nihon NAG, Tokyo.
More information about the J3
mailing list