From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5407 invoked by alias); 22 Nov 2006 15:13:16 -0000 Received: (qmail 5197 invoked by uid 48); 22 Nov 2006 15:13:01 -0000 Date: Wed, 22 Nov 2006 15:13:00 -0000 Subject: [Bug fortran/29941] New: gfortran reports error with len of assumed size character array X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "william dot mitchell at nist dot gov" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-11/txt/msg01952.txt.bz2 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