From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12597 invoked by alias); 18 Feb 2011 21:13:22 -0000 Received: (qmail 12588 invoked by uid 22791); 18 Feb 2011 21:13:21 -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; Fri, 18 Feb 2011 21:13:16 +0000 From: "mikael at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/46459] ICE (segfault): Invalid read in compare_actual_formal [error recovery] 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, patch X-Bugzilla-Severity: normal X-Bugzilla-Who: mikael 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: Keywords 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: Fri, 18 Feb 2011 21:17: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-02/txt/msg02209.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46459 Mikael Morin changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch CC| |mikael at gcc dot gnu.org --- Comment #1 from Mikael Morin 2011-02-18 21:13:11 UTC --- low hanging fruit: diff --git a/interface.c b/interface.c index 1e5df61..32c8b6e 100644 --- a/interface.c +++ b/interface.c @@ -2292,6 +2292,7 @@ compare_actual_formal (gfc_actual_arglist **ap, gfc_formal shape array, if the dummy argument has the VOLATILE attribute. */ if (f->sym->attr.volatile_ + && a->expr->expr_type == EXPR_VARIABLE && a->expr->symtree->n.sym->as && a->expr->symtree->n.sym->as->type == AS_ASSUMED_SHAPE && !(f->sym->as && f->sym->as->type == AS_ASSUMED_SHAPE)) @@ -2321,6 +2322,7 @@ compare_actual_formal (gfc_actual_arglist **ap, gfc_formal dummy argument has the VOLATILE attribute. */ if (f->sym->attr.volatile_ + && a->expr->expr_type == EXPR_VARIABLE && a->expr->symtree->n.sym->attr.pointer && a->expr->symtree->n.sym->as && !(f->sym->as