public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/29941]  New: gfortran reports error with len of assumed size character array
@ 2006-11-22 15:13 william dot mitchell at nist dot gov
  2006-11-22 21:04 ` [Bug fortran/29941] " burnus at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: william dot mitchell at nist dot gov @ 2006-11-22 15:13 UTC (permalink / raw)
  To: gcc-bugs

With this subroutine:

subroutine whatever(str)
character(len=*), dimension(*) :: str
integer :: i
i = len(str)
end subroutine whatever

gfortran reports:

i = len(str)
       1
Error: The upper bound in the last dimension must appear in the reference to
the assumed size array 'str' at (1)

The subroutine is valid -- you can pass an assumed size whole array to any
subroutine that does not need to know the shape of the array, and len can
accept either a scalar or an array.

The subroutine compiles if either an explicit length is given, i.e.
character(len=10), or the array is assumed shape, i.e. dimension(:).


-- 
           Summary: gfortran reports error with len of assumed size
                    character array
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: william dot mitchell at nist dot gov


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-03-22  6:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-22 15:13 [Bug fortran/29941] New: gfortran reports error with len of assumed size character array william dot mitchell at nist dot gov
2006-11-22 21:04 ` [Bug fortran/29941] " burnus at gcc dot gnu dot org
2006-11-23 17:56 ` pault at gcc dot gnu dot org
2006-11-28 23:43 ` pault at gcc dot gnu dot org
2006-12-09 12:15 ` patchapp at dberlin dot org
2006-12-09 20:42 ` pault at gcc dot gnu dot org
2006-12-21 14:33 ` [Bug fortran/29941] [4.1 and 4.2 only] " pault at gcc dot gnu dot org
2006-12-21 14:57 ` [Bug fortran/29941] [4.1 " pault at gcc dot gnu dot org
2007-03-22  6:39 ` pinskia at gcc dot gnu dot org
2007-03-22  6:40 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).