From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 67605 invoked by alias); 29 Jun 2017 17:36:51 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 67559 invoked by uid 89); 29 Jun 2017 17:36:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS,URIBL_RED autolearn=no version=3.3.2 spammy=54AM, 54am X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 29 Jun 2017 17:36:48 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F3535118E15; Thu, 29 Jun 2017 17:36:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com F3535118E15 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jakub@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com F3535118E15 Received: from tucnak.zalov.cz (ovpn-116-143.ams2.redhat.com [10.36.116.143]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 96D365D6A6; Thu, 29 Jun 2017 17:36:46 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id v5THaiGd010402; Thu, 29 Jun 2017 19:36:44 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id v5THagWc010401; Thu, 29 Jun 2017 19:36:42 +0200 Date: Thu, 29 Jun 2017 17:36:00 -0000 From: Jakub Jelinek To: Cesar Philippidis Cc: "gcc-patches@gcc.gnu.org" , Fortran List Subject: Re: [PATCH] Fix PR77765 Message-ID: <20170629173642.GE2123@tucnak> Reply-To: Jakub Jelinek References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) X-SW-Source: 2017-06/txt/msg00054.txt.bz2 On Thu, Jun 29, 2017 at 08:54:54AM -0700, Cesar Philippidis wrote: > PR77765 exposed an ICE triggered in gfortran's acc routine parser by an > uninitialized proc_name. That situation occurred because the function > containing the acc routine directive has an error, so > gfc_current_ns->proc_name was never set. > > Although it could be argued that the acc routine parser should not run > if any errors have been detected inside the routine containing such a > directive, this patch just teaches gfc_match_oacc_routine to check for > the existence of gfc_current_ns->proc_name before comparing the > procedure's name with the routine name specified by the user. > > Is this patch OK for trunk and gcc7? > > Thanks, > Cesar > 2017-06-29 Cesar Philippidis > > PR fortran/77765 > gcc/fortran/ > * openmp.c (gfc_match_oacc_routine): Check if proc_name exist before > comparing the routine name against it. > > gcc/testsuite/ > * gfortran.dg/goacc/pr77765.f90: New test. Ok, thanks. Jakub