[Bug fortran/34805] defined assignment not allowed to vector subscripted array

pault at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Mar 31 19:23:00 GMT 2008



------- Comment #4 from pault at gcc dot gnu dot org  2008-03-31 19:22 -------


> "If the actual argument is an array section having a vector subscript, the
> dummy argument is not definable and shall not have the INTENT (OUT), INTENT
> (INOUT), VOLATILE, or ASYNCHRONOUS attributes."
> 
> gfortran has this check - but it is not triggered for assignment(=) - or it
> happens later than the mismatch.

In spite of the message it is the INTENT(OUT) requirement that is being
applied. Eliminate the vector subscript or put it on the rhs and the testcase
compiles fine.

Note well that, in spite of the error, this occurs for an intrinsic type/
derive type assignment too.

I happen to think that the testcase is OK since the procedure is elemental.
It's interesting that everybody barfs on it, including Lahey....

Cheers

Paul


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34805



More information about the Gcc-bugs mailing list