public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix argument evaluation order [PR92178]
@ 2023-07-11 10:32 Mikael Morin
  2023-07-11 10:32 ` [PATCH 1/3] fortran: defer class wrapper initialization after deallocation [PR92178] Mikael Morin
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Mikael Morin @ 2023-07-11 10:32 UTC (permalink / raw)
  To: fortran, gcc-patches

Hello,

this is a followup to Harald's recent work [1] on the evaluation order
of arguments, when one of them is passed to an intent(out) allocatable
dummy and is deallocated before the call.
This extends Harald's fix to support:
 - scalars passed to assumed rank dummies (patch 1),
 - scalars passed to assumed rank dummies with the data reference
 depending on its own content (patch 2),
 - arrays with the data reference depending on its own content
 (patch 3).

There is one (last?) case which is not supported, for which I have opened
a separate PR [2].

Regression tested on x86_64-pc-linux-gnu. OK for master?

[1] https://gcc.gnu.org/pipermail/fortran/2023-July/059562.html 
[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110618

Mikael Morin (3):
  fortran: defer class wrapper initialization after deallocation
    [PR92178]
  fortran: Factor data references for scalar class argument wrapping
    [PR92178]
  fortran: Reorder array argument evaluation parts [PR92178]

 gcc/fortran/trans-array.cc                  |   3 +
 gcc/fortran/trans-expr.cc                   | 130 +++++++++++++++++---
 gcc/fortran/trans.cc                        |  28 +++++
 gcc/fortran/trans.h                         |   8 +-
 gcc/testsuite/gfortran.dg/intent_out_19.f90 |  22 ++++
 gcc/testsuite/gfortran.dg/intent_out_20.f90 |  33 +++++
 gcc/testsuite/gfortran.dg/intent_out_21.f90 |  33 +++++
 7 files changed, 236 insertions(+), 21 deletions(-)
 create mode 100644 gcc/testsuite/gfortran.dg/intent_out_19.f90
 create mode 100644 gcc/testsuite/gfortran.dg/intent_out_20.f90
 create mode 100644 gcc/testsuite/gfortran.dg/intent_out_21.f90

-- 
2.40.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-07-13 19:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-11 10:32 [PATCH 0/3] Fix argument evaluation order [PR92178] Mikael Morin
2023-07-11 10:32 ` [PATCH 1/3] fortran: defer class wrapper initialization after deallocation [PR92178] Mikael Morin
2023-07-11 10:32 ` [PATCH 2/3] fortran: Factor data references for scalar class argument wrapping [PR92178] Mikael Morin
2023-07-11 10:32 ` [PATCH 3/3] fortran: Reorder array argument evaluation parts [PR92178] Mikael Morin
2023-07-13 19:59 ` [PATCH 0/3] Fix argument evaluation order [PR92178] Harald Anlauf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).