From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10276 invoked by alias); 1 Nov 2008 22:15:26 -0000 Received: (qmail 29986 invoked by uid 48); 1 Nov 2008 22:14:05 -0000 Date: Sat, 01 Nov 2008 22:15:00 -0000 Message-ID: <20081101221405.29984.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/35040] usage of init expression in its own definition In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus 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: 2008-11/txt/msg00096.txt.bz2 ------- Comment #6 from burnus at gcc dot gnu dot org 2008-11-01 22:14 ------- (In reply to comment #5) > On a related note: The following snippet from PR36426 produces an ICE. > function foo(x) > character(len=len(x)) :: foo,x > end function foo As this ICE is a regression, I opened the PR 37992 for this. (It is also not an accepts invalid since gfortran 4.4 now prints an error message.) * * * For the LHS (of "=") expressions such as in comment 1, one now also gets the error message. * * * (In reply to comment #4) > > And I also believe all our examples in this PR are wrong. > In all the invalid examples given in comment #3, the dimension specification > is on the rhs of '::'. In my example it's on the lhs. Sorry, I don't understand / find your example. The example REAL, DIMENSION(2,2), PARAMETER :: xyz = RESHAPE((/ 1,2,3,4 /), SHAPE(xyz)) is no different from the invalid examples of comment #3: REAL :: X = EPSILON(X) > If the latter is invalid too, how about > DIMENSION :: xyz(2,2) > REAL, PARAMETER :: xyz = RESHAPE((/ 1,2,3,4 /), SHAPE(xyz)) I think that test case is OK. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35040