From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3752 invoked by alias); 14 Aug 2011 12:03:17 -0000 Received: (qmail 3740 invoked by uid 22791); 14 Aug 2011 12:03:15 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 14 Aug 2011 12:03:00 +0000 From: "janus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/50070] Segmentation fault at size_binop_loc in fold-const.c Date: Sun, 14 Aug 2011 12:08:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: janus at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: 2011-08/txt/msg01290.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D50070 --- Comment #4 from janus at gcc dot gnu.org 2011-08-14 12:02:57 UTC --- (In reply to comment #3) > The relevant quote from the F08 std is probably: >=20 > "C417 (R422) A type-param-value in a char-length shall be a colon, asteri= sk, or > speci=EF=AC=81cation-expr." >=20 > together with chapter 7.1.11 ("Speci=EF=AC=81cation expression"). Based on chapter 7.1.11, I would say that g95's error message is wrong: z d= oes not have to have constant length. "A speci=EF=AC=81cation-expr shall be a constant expression unless it is in= an interface body (12.4.3.2), the speci=EF=AC=81cation part of a subprogram or= BLOCK construct, a derived type de=EF=AC=81nition, or the declaration-type-spec o= f a FUNCTION statement (12.6.2.2)." Since z is in the specification part of a subprogram, there is no need for = to have constant length.