From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20786 invoked by alias); 6 Jul 2006 15:35:44 -0000 Received: (qmail 20743 invoked by alias); 6 Jul 2006 15:35:35 -0000 Date: Thu, 06 Jul 2006 15:35:00 -0000 Message-ID: <20060706153535.20742.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/28167] ICE: in fold_binary, at fold-const.c:8239 (temporary character array?) In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pault at gcc dot gnu dot org" 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 X-SW-Source: 2006-07/txt/msg00444.txt.bz2 List-Id: ------- Comment #7 from pault at gcc dot gnu dot org 2006-07-06 15:35 ------- Subject: Bug 28167 Author: pault Date: Thu Jul 6 15:35:24 2006 New Revision: 115222 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115222 Log: 2006-07-06 Paul Thomas PR fortran/28174 * trans-array.c (gfc_conv_expr_descriptor): When building temp, ensure that the substring reference uses a new charlen. * trans-expr.c (gfc_conv_aliased_arg): Add the formal intent to the argument list, lift the treatment of missing string lengths from the above and implement the use of the intent. (gfc_conv_function_call): Add the extra argument to the call to the above. PR fortran/28167 * trans-array.c (get_array_ctor_var_strlen): Treat a constant substring reference. * array.c (gfc_resolve_character_array_constructor): Remove static attribute and add the gfc_ prefix, make use of element charlens for the expression and pick up constant string lengths for expressions that are not themselves constant. * gfortran.h : resolve_character_array_constructor prototype added. * resolve.c (gfc_resolve_expr): Call resolve_character_array_ constructor again after expanding the constructor, to ensure that the character length is passed to the expression. 2006-07-06 Paul Thomas PR fortran/28174 * gfortran.dg/actual_array_substr_2.f90: New test. PR fortran/28167 * gfortran.dg/actual_array_constructor_2.f90: New test. Modified: branches/gcc-4_1-branch/gcc/fortran/ChangeLog branches/gcc-4_1-branch/gcc/fortran/array.c branches/gcc-4_1-branch/gcc/fortran/gfortran.h branches/gcc-4_1-branch/gcc/fortran/resolve.c branches/gcc-4_1-branch/gcc/fortran/trans-array.c branches/gcc-4_1-branch/gcc/fortran/trans-expr.c branches/gcc-4_1-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28167