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