From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5325 invoked by alias); 8 Jan 2011 23:35:55 -0000 Received: (qmail 5210 invoked by uid 22791); 8 Jan 2011 23:35:55 -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; Sat, 08 Jan 2011 23:35:51 +0000 From: "tkoenig at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/38536] ICE with C_LOC in resolve.c due to not properly going through expr->ref 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: tkoenig at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: mikael at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC 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: Sun, 09 Jan 2011 00:47: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-01/txt/msg00772.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38536 Thomas Koenig changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tkoenig at gcc dot gnu.org --- Comment #12 from Thomas Koenig 2011-01-08 23:35:40 UTC --- (In reply to comment #11) > (In reply to comment #10) > > Can this be closed? Is there something left to do here? > > > As of gfortran 4.4.4 (and 4.5.1) the program in comment #7 does not compile but > gives the same error: > > Error: CHARACTER argument 'buf' to 'c_loc' at (1) must have a length of 1 This might be sufficient to fix it. Index: resolve.c =================================================================== --- resolve.c (Revision 168596) +++ resolve.c (Arbeitskopie) @@ -2547,9 +2547,7 @@ is_scalar_expr_ptr (gfc_expr *expr) switch (ref->type) { case REF_SUBSTRING: - if (ref->u.ss.length != NULL - && ref->u.ss.length->length != NULL - && ref->u.ss.start + if (ref->u.ss.start && ref->u.ss.start->expr_type == EXPR_CONSTANT && ref->u.ss.end && ref->u.ss.end->expr_type == EXPR_CONSTANT)