From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32697 invoked by alias); 2 Oct 2018 20:30:06 -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 32655 invoked by uid 89); 2 Oct 2018 20:30:04 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=HX-Received:4151, CEST, Hx-languages-length:1163, visit X-HELO: mail-wr1-f49.google.com Received: from mail-wr1-f49.google.com (HELO mail-wr1-f49.google.com) (209.85.221.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 02 Oct 2018 20:30:03 +0000 Received: by mail-wr1-f49.google.com with SMTP id n1-v6so3667860wrt.10 for ; Tue, 02 Oct 2018 13:30:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:in-reply-to:references:mime-version:content-transfer-encoding :subject:to:from:message-id; bh=U0gVDHYUfCbjsQhDgpd8FO7SUPGn48+rixqkQtF+PYI=; b=L5ogs+l04FLv/VNjYWiELtFU1NnSv8GoDixFjPnkNv2B1nwAhpaf2eJZ7gkg1ZjNM7 fznhPLiA4K3Gu+LlvWE7Ri1ajHOuoShLaSzdgdrvWQtQhv3Qs7PQOY0Ize8MMSpoNHO9 b3Fz4+zO4UtLHp8LCQQ1d0ztDeDDldQXWaszPn2NkO8TscZ5P/OqVyAIvGvkfWhBaH4a i07VXMDewx2iEPWlvSmcOVFio5Jo1pbfLdl0Hb+c0jrP2FfRngBj1a3ioTYFKTrplHng uGqyrBybC5jM0Ahju7iKtybS60yXGcLQs+lbx0LKKz5KA9mJsjOs7wtMuFWWHgCa8esx tcIg== Return-Path: Received: from [10.37.48.142] (089144203179.atnat0012.highway.a1.net. [89.144.203.179]) by smtp.gmail.com with ESMTPSA id 204-v6sm18272496wmh.25.2018.10.02.13.29.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Oct 2018 13:30:00 -0700 (PDT) Date: Tue, 02 Oct 2018 20:30:00 -0000 In-Reply-To: <70aa6842-6ccb-5c2b-b664-95d1c9abb1cb@codesourcery.com> References: <70aa6842-6ccb-5c2b-b664-95d1c9abb1cb@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [patch,openacc] Check for sufficient parallelism when calling acc routines in Fortran To: Cesar Philippidis ,Fortran List ,"Schwinge, Thomas" From: Bernhard Reutner-Fischer Message-ID: <9FF032A2-E4CC-49CF-A72B-CAE7A8D0D369@gmail.com> X-IsSubscribed: yes X-SW-Source: 2018-10/txt/msg00008.txt.bz2 On 2 October 2018 17:06:17 CEST, Cesar Philippidis = wrote: s/ to for the/ for the/g In routine-nested-parallelism.f you seem to always use a(1) as the lhs wher= e I'd maybe have used a(i). Not that it's make a difference though. @@ -2429,7 +2436,8 @@ gfc_match_oacc_routine (void) &old_loc)) goto cleanup; =20 - gfc_current_ns->proc_name->attr.oacc_function =3D dims; + gfc_current_ns->proc_name->attr.oacc_function + =3D seen_error ? OACC_FUNCTION_SEQ : dims; Surplus vertical space, I think. @@ -2319,7 +2319,13 @@ gfc_match_oacc_routine (void) { if ((isym =3D gfc_find_function (buffer)) =3D=3D NULL && (isym =3D gfc_find_subroutine (buffer)) =3D=3D NULL) - st =3D gfc_find_symtree (gfc_current_ns->sym_root, buffer); + { + st =3D gfc_find_symtree (gfc_current_ns->sym_root, buffer); + if (st =3D=3D NULL && gfc_current_ns->proc_name->attr.contained + && gfc_current_ns->parent) + st =3D gfc_find_symtree (gfc_current_ns->parent->sym_root, + buffer); + } I think we have a gfc_find_sym_tree() which will visit (all) parents and wh= ich maybe is appropriate here. cheers,=20