This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]