From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 688 invoked by alias); 28 Nov 2012 10:55:25 -0000 Received: (qmail 489 invoked by uid 48); 28 Nov 2012 10:54:57 -0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/55501] [F03] ICE using MERGE in constant expr Date: Wed, 28 Nov 2012 10:55: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-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: janus 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" 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: 2012-11/txt/msg02707.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55501 --- Comment #8 from Tobias Burnus 2012-11-28 10:54:56 UTC --- (In reply to comment #5) > + && tsource->expr_type != EXPR_STRUCTURE) That's not okay: If you have integer, allocatable :: a(:), b(:) one has an EXPR_STRUCTURE for "[a,b]" but not a constant expression. One has to do a deep check. Well, gfc_is_constant_expr() is supposed to do this. (Or should gfc_check_init_expr be used? I always confuse the two. For F90/F95 it makes a difference, for F200x it doesn't, and gfortran's usage is a mess.)