The following code is invalid (from comp.lang.fortran):

  character(len=16) :: strtofind !String one is looking for
  strtofind = "1               "
  write(strtofind,'(A1,A,A1)') ',',trim(adjustl(strtofind)),','
  print *, "|", strtofind , "|"
  end

9.4.4.4 Data Transfer (in F95) says "If an internal file has been specified, an
input/output list item shall not be in the file or associated with the file."

This is basically equivalent to:
  character(len=10) :: s
  write(s,'(A)') s
  end


-- 
           Summary: Internal file forbidden as I/O list item
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: accepts-invalid, diagnostic
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: fxcoudert at gcc dot gnu dot org


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

Reply via email to