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


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