From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18199 invoked by alias); 12 Jul 2011 12:28:00 -0000 Received: (qmail 18180 invoked by uid 22791); 12 Jul 2011 12:27:53 -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; Tue, 12 Jul 2011 12:27:39 +0000 From: "janus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/49708] [4.5/4.6/4.7 Regression] ICE with allocate and no dimensions 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: NEW X-Bugzilla-Priority: P5 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.2 X-Bugzilla-Changed-Fields: Status Last reconfirmed Ever Confirmed 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 Date: Tue, 12 Jul 2011 12:28:00 -0000 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-07/txt/msg00894.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49708 janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2011.07.12 12:27:33 Ever Confirmed|0 |1 --- Comment #2 from janus at gcc dot gnu.org 2011-07-12 12:27:33 UTC --- (In reply to comment #1) > In principle, the check is still in resolve.c - the question is: Why doesn't it > trigger? Apparently because of the pointer attribute. Changing "pointer" to "allocatable" in the test case will trigger the error message. With the following patch one also gets the error message for the pointer case, but I haven't checked if this breaks anything else: Index: gcc/fortran/resolve.c =================================================================== --- gcc/fortran/resolve.c (revision 175788) +++ gcc/fortran/resolve.c (working copy) @@ -6884,7 +6884,7 @@ resolve_allocate_expr (gfc_expr *e, gfc_code *code gfc_find_derived_vtab (ts.u.derived); } - if (pointer || (dimension == 0 && codimension == 0)) + if (dimension == 0 && codimension == 0) goto success; /* Make sure the last reference node is an array specifiction. */