From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18834 invoked by alias); 23 Oct 2008 21:28:56 -0000 Received: (qmail 18580 invoked by uid 48); 23 Oct 2008 21:27:34 -0000 Date: Thu, 23 Oct 2008 21:28:00 -0000 Message-ID: <20081023212734.18579.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/37903] [4.3/4.4 Regression] wrong-code for complicated vector subscripts In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "mikael dot morin at tele2 dot fr" 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: 2008-10/txt/msg01551.txt.bz2 ------- Comment #3 from mikael dot morin at tele2 dot fr 2008-10-23 21:27 ------- Quickfix (understand: not regression tested): Index: trans-array.c =================================================================== --- trans-array.c (révision 141321) +++ trans-array.c (copie de travail) @@ -3380,7 +3380,7 @@ { /* The frontend has worked out the size for us. */ loopspec[n] = ss; - continue; + break; } if (ss->type == GFC_SS_CONSTRUCTOR) This forces to use the array constructor's ss to setup the loop. As it is zero-based, the upper bounds has the proper value and the array has the proper size. I suspect this is only hiding the problem though. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37903