]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: fix argument passing to CONTIGUOUS,TARGET dummy [PR97592]
authorHarald Anlauf <anlauf@gmx.de>
Sat, 16 Dec 2023 18:14:55 +0000 (19:14 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Wed, 27 Dec 2023 17:30:14 +0000 (18:30 +0100)
commit019abe7aa98feae1514c0e51c51fe424e28e2c21
treeddb5ab08249983aaeba12b0030d81e2f5d126df3
parenta15ca809b3f771190df6f6e028e8615113fe04cc
Fortran: fix argument passing to CONTIGUOUS,TARGET dummy [PR97592]

gcc/fortran/ChangeLog:

PR fortran/97592
* trans-expr.cc (gfc_conv_procedure_call): For a contiguous dummy
with the TARGET attribute, the effective argument may still be
contiguous even if the actual argument is not simply-contiguous.
Allow packing to be decided at runtime by _gfortran_internal_pack.

gcc/testsuite/ChangeLog:

PR fortran/97592
* gfortran.dg/contiguous_15.f90: New test.

(cherry picked from commit 5060825aa78b3da036df6437390fd42d094d8f15)
gcc/fortran/trans-expr.cc
gcc/testsuite/gfortran.dg/contiguous_15.f90 [new file with mode: 0644]