public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
To: Cesar Philippidis <cesar@codesourcery.com>,Fortran List
	<fortran@gcc.gnu.org>,"Schwinge,
	Thomas" <Thomas_Schwinge@mentor.com>
Subject: Re: [patch,openacc] Check for sufficient parallelism when calling acc routines in Fortran
Date: Tue, 02 Oct 2018 20:30:00 -0000	[thread overview]
Message-ID: <9FF032A2-E4CC-49CF-A72B-CAE7A8D0D369@gmail.com> (raw)
In-Reply-To: <70aa6842-6ccb-5c2b-b664-95d1c9abb1cb@codesourcery.com>

On 2 October 2018 17:06:17 CEST, Cesar Philippidis <cesar@codesourcery.com> wrote:

s/ to for the/ for the/g

In routine-nested-parallelism.f you seem to always use a(1) as the lhs where 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;
 
-      gfc_current_ns->proc_name->attr.oacc_function = dims;
+      gfc_current_ns->proc_name->attr.oacc_function
+	= seen_error ? OACC_FUNCTION_SEQ : dims;

Surplus vertical space, I think.



@@ -2319,7 +2319,13 @@ gfc_match_oacc_routine (void)
 	{
 	  if ((isym = gfc_find_function (buffer)) == NULL
 	      && (isym = gfc_find_subroutine (buffer)) == NULL)
-	    st = gfc_find_symtree (gfc_current_ns->sym_root, buffer);
+	    {
+	      st = gfc_find_symtree (gfc_current_ns->sym_root, buffer);
+	      if (st == NULL && gfc_current_ns->proc_name->attr.contained
+		  && gfc_current_ns->parent)
+		st = 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 which maybe is appropriate here.

cheers, 

      reply	other threads:[~2018-10-02 20:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-02 15:06 Cesar Philippidis
2018-10-02 20:30 ` Bernhard Reutner-Fischer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9FF032A2-E4CC-49CF-A72B-CAE7A8D0D369@gmail.com \
    --to=rep.dot.nop@gmail.com \
    --cc=Thomas_Schwinge@mentor.com \
    --cc=cesar@codesourcery.com \
    --cc=fortran@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).