Hi! On Thu, 28 Feb 2019 21:37:21 +0100, I wrote: > On Mon, 15 Aug 2016 18:54:49 -0700, Cesar Philippidis wrote: > > [...] > > > > Note that besides for checking for multiple acc routine directives, this > > patch also handles the case where the optional name argument in 'acc > > routine (NAME)' is the name of the current procedure. This was a TODO > > item in gomp4. > > > --- a/gcc/fortran/openmp.c > > +++ b/gcc/fortran/openmp.c > > > @@ -1969,6 +1971,13 @@ gfc_match_oacc_routine (void) > > gfc_current_locus = old_loc; > > return MATCH_ERROR; > > } > > + > > + /* Set sym to NULL if it matches the current procedure's > > + name. This will simplify the check for duplicate ACC > > + ROUTINE attributes. */ > > + if (gfc_current_ns->proc_name > > + && !strcmp (buffer, gfc_current_ns->proc_name->name)) > > + sym = NULL; > > } > > else > > { > > I re-worked the code a bit, didn't find this necessary. Specifically, a very similar check has already been present, comparing to 'sym->name' instead of 'buffer'. (Not sure, if one is to be preferred over the other, when/if they would ever be different. It feels like instead of these strings, we should be comparing some kind of symbolic "resolved" handle, "sym". And, as it should turn out, I have a cleanup patch for next GCC development stage 1 to clean up that and other stuff in 'gfc_match_oacc_routine'.) Anyway, to clarify, I committed to trunk r269856 "[PR72741] The name in a Fortran OpenACC 'routine' directive refers to the containing subroutine or function", see attached. Grüße Thomas