From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13267 invoked by alias); 9 Feb 2010 03:41:55 -0000 Received: (qmail 13225 invoked by uid 48); 9 Feb 2010 03:41:40 -0000 Date: Tue, 09 Feb 2010 03:41:00 -0000 Message-ID: <20100209034140.13224.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/42999] [4.5 Regression] bogus error: Parameter 'i' at (1) has not been declared or is a variable, which does not reduce to a constant expression In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jvdelisle 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: 2010-02/txt/msg00775.txt.bz2 ------- Comment #3 from jvdelisle at gcc dot gnu dot org 2010-02-09 03:41 ------- I was being a bit too aggressive. The following patch fixes it. The problem does not exist on fortran-exp. I removed my original patch from the branch since handling of constructors is being revamped completely. The fortran-dev branch will pick this up on the next merge from trunk. Regression tested fine and I will commit tomorrow evening (PST) Index: array.c =================================================================== --- array.c (revision 156592) +++ array.c (working copy) @@ -1522,8 +1522,7 @@ gfc_constant_ac (gfc_expr *e) rc = SUCCESS; if (e->value.constructor - && e->value.constructor->expr->expr_type == EXPR_ARRAY - && !e->value.constructor->iterator) + && e->value.constructor->expr->expr_type == EXPR_ARRAY) { /* Expand the constructor. */ iter_stack = NULL; -- jvdelisle at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |jvdelisle at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Last reconfirmed|2010-02-08 15:01:28 |2010-02-09 03:41:40 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42999