From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7774 invoked by alias); 16 Jun 2006 16:18:45 -0000 Received: (qmail 7740 invoked by alias); 16 Jun 2006 16:18:39 -0000 Date: Fri, 16 Jun 2006 16:24:00 -0000 Message-ID: <20060616161839.7739.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/16206] rejects valid array initialization expression In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "paulthomas2 at wanadoo dot fr" 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-06/txt/msg01564.txt.bz2 List-Id: ------- Comment #9 from paulthomas2 at wanadoo dot fr 2006-06-16 16:18 ------- Subject: Re: rejects valid array initialization expression Harald, >You might wish to extend this to m(5) = ..., because: > > > >> integer, parameter :: p(8) = (/(m(i:i+1), i = 1,4)/) >> >> > >the last accessed element is m(5). > > This lost me a couple of evenings because it kept segfaulting on the out-of bounds reference! I thought that it was something wrong with the logic of the patch..... *groan*. I have put bounds checking in there now and will likely submit tomorrow or Sunday morning. gfortran now does more with initializers than any other compiler that I can lay hands on. Thanks Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16206