From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5345 invoked by alias); 18 Oct 2010 02:18:08 -0000 Received: (qmail 5335 invoked by uid 22791); 18 Oct 2010 02:18:07 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,MISSING_MID 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; Mon, 18 Oct 2010 02:17:59 +0000 From: "kargl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/46060] gfortran crash when referencing procedure pointer X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: kargl 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: CC Severity 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: Mon, 18 Oct 2010 02:18: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: 2010-10/txt/msg01435.txt.bz2 Message-ID: <20101018021800.7xmUDT04no4nTHXMW8Bw9DUkNSa3D-H6zbtVWA2bsJ0@z> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46060 kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org Severity|critical |normal --- Comment #1 from kargl at gcc dot gnu.org 2010-10-18 02:17:48 UTC --- The following patch allows your code to compile, but I have no idea if it is the correct fix. Index: trans-expr.c =================================================================== --- trans-expr.c (revision 165533) +++ trans-expr.c (working copy) @@ -5675,7 +5675,7 @@ gfc_trans_assignment_1 (gfc_expr * expr1 gfc_conv_expr (&rse, expr2); /* Stabilize a string length for temporaries. */ - if (expr2->ts.type == BT_CHARACTER) + if (expr2->ts.type == BT_CHARACTER && rse.string_length) string_length = gfc_evaluate_now (rse.string_length, &rse.pre); else string_length = NULL_TREE;