From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22948 invoked by alias); 9 Aug 2011 02:11:29 -0000 Received: (qmail 22934 invoked by uid 22791); 9 Aug 2011 02:11:28 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 09 Aug 2011 02:11:02 +0000 From: "damian at rouson dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/45170] [F2003] allocatable character lengths X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: damian at rouson dot net X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Tue, 09 Aug 2011 02:11:00 -0000 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: 2011-08/txt/msg00912.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45170 Damian Rouson changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |damian at rouson dot net --- Comment #19 from Damian Rouson 2011-08-09 02:09:56 UTC --- Comment 9 states that gfortran does not yet support "function result variables which are character(len=:), pointer". Presumably this also implies a lack of support for replacing these with allocatable, deferred-length character variables. I'm adding the case below because it produces an ICE with gfortran 4.6.1: $ cat speaker.F90 module speaker_class type speaker contains procedure :: speak end type contains function speak(this) class(speaker) ,intent(in) :: this character(:) ,allocatable :: speak end function subroutine say_something(somebody) class(speaker) :: somebody print *,somebody%speak() end subroutine end module $ gfortran -c speaker.F90 speaker.F90: In function 'say_something': speaker.F90:13:0: internal compiler error: in fold_convert_loc, at fold-const.c:1906 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. $ gfortran --version GNU Fortran (GCC) 4.6.1 20110325 (prerelease) Copyright (C) 2011 Free Software Foundation, Inc. GNU Fortran comes with NO WARRANTY, to the extent permitted by law. You may redistribute copies of GNU Fortran under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING