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



             Bug #: 55762

           Summary: Diagnostic: Passing a procedure to LEN should tell

                    that one has passed a procedure

    Classification: Unclassified

           Product: gcc

           Version: 4.8.0

            Status: UNCONFIRMED

          Keywords: diagnostic

          Severity: normal

          Priority: P3

         Component: fortran

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: bur...@gcc.gnu.org





Reported at http://gcc.gnu.org/ml/fortran/2012-12/msg00145.html



"s" is declared as CHARACTER, but it is also used as "s(i)", hence, it is

marked as function. That leads to the error message:



      n = len(s)

              1

Error: 'string' argument of 'len' intrinsic at (1) must be CHARACTER





It would be more helpful to state that "S" is a function (procedure) in this

case - as NAG or g95 do:



  Error: Argument STRING to the LEN intrinsic is a procedure

  Type of argument 'string' in call to 'len' at (1) should be CHARACTER(1), not

PROCEDURE

Reply via email to