From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5174 invoked by alias); 26 Nov 2006 12:34:39 -0000 Received: (qmail 5135 invoked by uid 48); 26 Nov 2006 12:34:26 -0000 Date: Sun, 26 Nov 2006 12:34:00 -0000 Message-ID: <20061126123426.5134.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/29892] substring out of bounds: Missing variable name for variables with parameter attribute In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "fxcoudert at gcc dot gnu dot org" 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/msg02276.txt.bz2 ------- Comment #3 from fxcoudert at gcc dot gnu dot org 2006-11-26 12:34 ------- Fixed for array bounds checking on mainline. I'll backport the patch to 4.2 in some time. We still need to figure something out for the substrings case (see comment #0): > Secondly, gfc_conv_substring_expr (tested by adding the following to > gfc_conv_substring_expr: > printf("ERROR: gfc_conv_substring_expr: NO NAME" > "(in file '%s', at line %d)\n", expr->where.lb->file->filename, > expr->where.lb->linenum); ): > > Several matches of this kind: > - gfortran.dg/char_cshift_1.f90 > a(i1, i2, i3) = 'ab'(i1:i1) // 'cde'(i2:i2) // 'fghi'(i3:i3) > => Unsolvable as no name exists > > Solvable case: gfortran.dg/pr29067.f: > character(len=16),parameter :: s = "", s2 = "1234567890123456" > print *, s(9:16) > print *, s2(9:16) > The problem is that s and s2 have the parameter type -- fxcoudert at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |4.2.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29892