This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

Cheers,

Tobias


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]