[PATCH] OpenACC 2.6 manual deep copy support (attach/detach)

Julian Brown julian@codesourcery.com
Tue Nov 26 02:54:00 GMT 2019


On Mon, 25 Nov 2019 11:27:35 +0100
Tobias Burnus <tobias@codesourcery.com> wrote:

> Hi Julian,
> 
> On 11/23/19 12:42 AM, Julian Brown wrote:
> >
> >              gcc/fortran/
> >              * trans-expr.c
> >              (gfc_auto_dereference_var): New function, broken out
> > of... […]
> > +gfc_auto_dereference_var (location_t loc, gfc_symbol *sym, tree
> > var,
> > +			  bool descriptor_only_p, bool
> > is_classarray) […]
> > +	var = build_fold_indirect_ref_loc (input_location, var);  
> As your patch takes a location as argument – it also makes sense to
> use that location. (Alternatively, one could remove the argument as
> both callers explicitly pass 'input_location' as argument.)
> 
> One could do either way, but the current variant does not make sense
> – and, additionally, the current variant causes a compile-time
> warning.
> 
> See also my OG9 commit 500483e6ced44e2e0fea6a37e4f8c267ebaf826a where
> do s/input_location/loc/g in that function.

Thanks -- I'd missed that. This version of the patch uses your
alternative suggestion -- i.e., removing the location_t parameter from
gfc_auto_dereference_var. That gets rid of the warning.

The rest of the patch is as the last-posted version.

Cheers,

Julian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: attach-detach-fsf-20191126.diff
Type: text/x-patch
Size: 177487 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20191126/c3b56f77/attachment.bin>


More information about the Gcc-patches mailing list