From patchwork Fri Nov 14 07:29:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cesar Philippidis X-Patchwork-Id: 410722 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4264E1400D2 for ; Fri, 14 Nov 2014 18:30:06 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; q=dns; s=default; b=wVcpLgB6LLfPOQHl9 hd/hv4EJd7JdQxvFVpUt3rSzq+il6Tzebyfxe6YMi3TNEPic4ASYxqt6HX3oLfCX i0qwMNXiKWHsspOXLE7jIDVq1yc1zQwK/P2Q+j2IN3a7AlBxqMArHO9jhY+naJGu rmm8E6I6MPqIKdhi04BLPiZB10= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; s=default; bh=HY5pv8pnes1SgAO5alKamLY skoY=; b=A71rsA99N0r0+YcpNaT0fcUJbXVhOlTITbIcAL0rOMSruxp/NKIBOaM zLf7jI3WrjIJZOaSFbw6fCUu6/SCZYLz571Nq++zHUCI1V38PN46fVAHeAsD5Jzz qN7DBwRtaJrnXSiWHdpuvOxzdVG1Ld1ZWLiHgyy0y2zQEJ04ckjk= Received: (qmail 24066 invoked by alias); 14 Nov 2014 07:29:59 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 24041 invoked by uid 89); 14 Nov 2014 07:29:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 14 Nov 2014 07:29:56 +0000 Received: from svr-orw-fem-05.mgc.mentorg.com ([147.34.97.43]) by relay1.mentorg.com with esmtp id 1XpBKJ-0002UU-Sa from Cesar_Philippidis@mentor.com ; Thu, 13 Nov 2014 23:29:51 -0800 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.3.181.6; Thu, 13 Nov 2014 23:29:51 -0800 Message-ID: <5465AF6D.7020709@codesourcery.com> Date: Thu, 13 Nov 2014 23:29:49 -0800 From: Cesar Philippidis User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Jakub Jelinek CC: "gcc-patches@gcc.gnu.org" , , Ilmir Usmanov , Tobias Burnus Subject: Re: [patch] OpenACC fortran front end References: <545BF570.8070508@codesourcery.com> <20141113164320.GW5026@tucnak.redhat.com> <54655E88.2010502@codesourcery.com> <20141114065252.GD5026@tucnak.redhat.com> In-Reply-To: <20141114065252.GD5026@tucnak.redhat.com> On 11/13/2014 10:52 PM, Jakub Jelinek wrote: > On Thu, Nov 13, 2014 at 05:44:40PM -0800, Cesar Philippidis wrote: >> Thanks. I couldn't figure out how to assign the bugs in the PR. Maybe my >> account doesn't have permission to do so. Regardless, I'll work on them. > > Use your @gcc.gnu.org account instead, then you have far more permissions > in bugzilla. Thanks. I'll look into that. >> --- a/gcc/fortran/gfortran.h >> +++ b/gcc/fortran/gfortran.h >> @@ -1262,14 +1262,8 @@ typedef struct gfc_omp_clauses >> gfc_expr_list *tile_list; >> unsigned async:1, gang:1, worker:1, vector:1, seq:1, independent:1; >> unsigned wait:1, par_auto:1, gang_static:1; > > The /* !$ACC DECLARE locus. */ comment wouldn't hurt here. > >> --- a/gcc/fortran/match.c >> +++ b/gcc/fortran/match.c >> @@ -2491,8 +2491,8 @@ match_exit_cycle (gfc_statement st, gfc_exec_op op) >> >> if (o != NULL) >> { >> - gfc_error ("%s statement at %C leaving OpenMP or OpenACC structured block", >> - gfc_ascii_statement (st)); >> + gfc_error ("%s statement at %C leaving %s structured block", >> + gfc_ascii_statement (st), is_oacc (p) ? "OpenACC" : "OpenMP"); > > You want > gfc_error (is_oacc (p) > ? "%s statement at %C leaving OpenACC structured block" > : "%s statement at %C leaving OpenMP structured block", > gfc_ascii_statement (st)); > instead to be more translation friendly. > >> @@ -5545,3 +5547,28 @@ duplicate_main: >> gfc_done_2 (); >> return true; >> } >> + >> +/* Return true if this state data represents an OpenACC region. */ >> +bool >> +is_oacc (gfc_state_data *sd) >> +{ >> + switch (sd->construct->op) >> + { >> + case EXEC_OACC_PARALLEL_LOOP:break; >> + case EXEC_OACC_PARALLEL: > > What is that break; doing there? Then you fall through into end of function > without return (and missing space before it). It's bogus. I've applied the attach patch to gomp-4_0-branch which addresses these two problems. Thanks, Cesar 2014-11-13 Cesar Philippidis gcc/fortran/ * match.c (match_exit_cycle): Restructure error strings. * parse.c (is_oacc): Remove bogus break. Index: gcc/fortran/match.c =================================================================== --- gcc/fortran/match.c (revision 217532) +++ gcc/fortran/match.c (working copy) @@ -2491,8 +2491,10 @@ match_exit_cycle (gfc_statement st, gfc_ if (o != NULL) { - gfc_error ("%s statement at %C leaving %s structured block", - gfc_ascii_statement (st), is_oacc (p) ? "OpenACC" : "OpenMP"); + gfc_error (is_oacc (p) + ? "%s statement at %C leaving OpenACC structured block" + : "%s statement at %C leaving OpenMP structured block", + gfc_ascii_statement (st)); return MATCH_ERROR; } Index: gcc/fortran/parse.c =================================================================== --- gcc/fortran/parse.c (revision 217532) +++ gcc/fortran/parse.c (working copy) @@ -5554,7 +5554,7 @@ is_oacc (gfc_state_data *sd) { switch (sd->construct->op) { - case EXEC_OACC_PARALLEL_LOOP:break; + case EXEC_OACC_PARALLEL_LOOP: case EXEC_OACC_PARALLEL: case EXEC_OACC_KERNELS_LOOP: case EXEC_OACC_KERNELS: