From: Mikael Morin <[email protected]>

The function gfc_conv_subref_array_arg implements copy-in/copy-out
for an argument passed to a procedure.  As copy-in/copy-out breaks
pointers, it means that in the contexts where the function is used
the argument must not be a pointer.  So the formal_ptr argument of
the function, indicating whether it is called in the context of a
pointer argument, is useless.  This series removes it in two steps.

In the first patch, for every call to gfc_conv_subref_array_arg, the
context is used to conclude the formal_ptr argument to have false value.

In the second patch, the false value that is used for every call is
hardcoded in the function and the argument is removed.

Mikael Morin (2):
  fortran: Conclude non-pointer in copy-in/copy-out cases
  fortran: Remove always false dummy pointer conditional

 gcc/fortran/trans-array.cc |  2 +-
 gcc/fortran/trans-expr.cc  | 68 ++++++--------------------------------
 gcc/fortran/trans-io.cc    |  4 +--
 gcc/fortran/trans-stmt.cc  |  5 ++-
 gcc/fortran/trans.h        |  2 +-
 5 files changed, 17 insertions(+), 64 deletions(-)

-- 
2.53.0

Reply via email to