From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6877 invoked by alias); 10 Nov 2005 15:54:34 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 6857 invoked by uid 48); 10 Nov 2005 15:54:31 -0000 Date: Thu, 10 Nov 2005 15:54:00 -0000 Message-ID: <20051110155431.6856.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/24705] ICE on assumed length character result In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "paul dot richard dot thomas at cea dot fr" X-SW-Source: 2005-11/txt/msg01477.txt.bz2 List-Id: ------- Comment #2 from paul dot richard dot thomas at cea dot fr 2005-11-10 15:54 ------- The following patch fixes this PR. Please note that it has yet to be regtested but I do not see any problems with it. I do not thank that PR15809 has anything to do with this one. Index: gcc/gcc/fortran/resolve.c =================================================================== RCS file: /cvsroot/gcc/gcc/gcc/fortran/resolve.c,v retrieving revision 1.63 diff -c -p -r1.63 resolve.c *** gcc/gcc/fortran/resolve.c 24 Oct 2005 19:28:17 -0000 1.63 --- gcc/gcc/fortran/resolve.c 10 Nov 2005 15:48:51 -0000 *************** resolve_contained_fntype (gfc_symbol * s *** 294,299 **** --- 294,307 ---- sym->attr.untyped = 1; } } + + if (sym->ts.type == BT_CHARACTER) + { + gfc_charlen *cl = sym->ts.cl; + if (!cl || !cl->length) + gfc_error ("Character-valued internal function '%s' at %L must " + "not be automatic length", sym->name, &sym->declared_at); + } } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24705