Allocatable components to the right of a nonzero-rank part reference
Steve Kargl
sgk@troutmask.apl.washington.edu
Thu Nov 16 21:43:00 GMT 2006
On Thu, Nov 16, 2006 at 10:53:09PM +0200, erik.edelmann@iki.fi wrote:
>
> According to the standard, "A part-name to the right of a part-ref with
> nonzero rank shall not have the ALLOCATABLE or POINTER attribute."
> (F2003 draft standard, page 105, lines 12-13).
>
> Currently we accept it for ALLOCATABLEs for some cases (e.g. as procedure
> arguments, and in WHEREs), but get ICEs for other cases (e.g. plain
> array assignments).
>
> The question now is what we should do about this. We could
>
> (a) Allways reject (attached patch does that).
>
> (b) Accept it as an extension. Those cases that don't work can be
> implemented eventually (I can open a PR). This would be a nice
> extension, but it has the downside that it could get quite
> complicated. I haven't thought a lot about it, but I guess that
> e.g.
>
> p => x(:)%y(1)
>
> where y is an allocatable component, is somewhere between
> difficult and impossible to implement.
>
> (c) Like (b), but reject the most difficult cases.
>
> Perhaps we could do (a) for 4.2, and (c) for 4.3? Opinions?
>
I think (a) is the preferred solution. (b) and (c) seem to
lead to a dangerously slippery slope.
--
Steve
More information about the Fortran
mailing list