[committed] [PR85221] Set 'omp declare target', 'omp declare target link' attributes for Fortran OpenACC 'declare'd variables (was: [gomp4] Re: OpenACC declare directive updates)

Thomas Schwinge thomas@codesourcery.com
Tue Jun 18 23:02:00 GMT 2019


Hi!

On Fri, 27 Nov 2015 12:37:23 +0100, I wrote:
> On Thu, 19 Nov 2015 10:22:16 -0600, James Norris <jnorris@codesourcery.com> wrote:
> > [...]

> Merging your trunk r230722 and r230725 with the existing Fortran OpenACC
> declare implementation present on gomp-4_0-branch, I effectively applied
> the following to gomp-4_0-branch in 231002.  Please verify this.
> 
> Regarding my Fortran XFAIL comments in
> <http://mid.mail-archive.com/878u5n7pqk.fsf@hertz.schwinge.homeip.net>,
> with some of my earlier changes "#if 0"ed in
> gcc/fortran/trans-decl.c:add_attributes_to_decl,
> libgomp.oacc-fortran/declare-3.f90 again PASSes.  But I don't understand
> (why something like) this code (isn't needed/done differently in C/C++).

There remains a lot of mystery to be resolved regarding the OpenACC
'declare' implementation...  :-(

> --- gcc/fortran/trans-decl.c
> +++ gcc/fortran/trans-decl.c
> @@ -1302,15 +1302,20 @@ add_attributes_to_decl (symbol_attribute sym_attr, tree list)
>        }
>  
>    if (sym_attr.omp_declare_target
> +#if 0 /* TODO */
>        || sym_attr.oacc_declare_create
>        || sym_attr.oacc_declare_copyin
>        || sym_attr.oacc_declare_deviceptr
> -      || sym_attr.oacc_declare_device_resident)
> +      || sym_attr.oacc_declare_device_resident
> +#endif
> +      )
>      list = tree_cons (get_identifier ("omp declare target"),
>  		      NULL_TREE, list);
> +#if 0 /* TODO */
>    if (sym_attr.oacc_declare_link)
>      list = tree_cons (get_identifier ("omp declare target link"),
>  		      NULL_TREE, list);
> +#endif

As PR85221 "[openacc] ICE in install_var_field, at omp-low.c:657" tells
us, yes, these are actually necessary.

I'm confused why not all OpenACC 'declare' clauses are handled here, but
looking into that is for another day, or week.

Committed to trunk in r272453 "[PR85221] Set 'omp declare target', 'omp
declare target link' attributes for Fortran OpenACC 'declare'd
variables", see attached.


Grüße
 Thomas


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-PR85221-Set-omp-declare-target-omp-declare-tar.trunk.patch
Type: text/x-diff
Size: 3617 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20190618/af0c7522/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 658 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20190618/af0c7522/attachment.sig>


More information about the Fortran mailing list