This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34805] defined assignment not allowed to vector subscripted array
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Jan 2008 16:34:51 -0000
- Subject: [Bug fortran/34805] defined assignment not allowed to vector subscripted array
- References: <bug-34805-15620@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from burnus at gcc dot gnu dot org 2008-01-16 16:34 -------
Found the relevant part in the Fortran standard:
Fortran 2003: "12.4.1.2 Actual arguments associated with dummy data objects"
"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.
It would helpful, if you could find the interpretation or re-check the test
case.
(There is a to-be corrected typo:
@@ -2001,7 +2025,7 @@ compare_actual_formal (gfc_actual_arglis
{
if (where)
gfc_error ("Array-section actual argument with vector subscripts "
- "at %L is incompatible with INTENT(IN), INTENT(INOUT) "
+ "at %L is incompatible with INTENT(OUT), INTENT(INOUT) "
"or VOLATILE attribute of the dummy argument '%s'",
&a->expr->where, f->sym->name);
return 0;
)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34805