Der Harald, hi all,
On 11.08.21 21:25, Harald Anlauf via Fortran wrote:
the checks for the STAT= and ERRMSG= arguments to the coarray SYNC statements
did not properly handle several cases, such as named constants (parameters).
While fixing this, I adjusted the code similarly to what was recently done
for (DE)ALLOCATE. We now also accept function references with data pointer
result. (See also PR101652).
Regtested on x86_64-pc-linux-gnu. OK for mainline?
OK.
Thanks,
Tobias
PS: I will try to review your remaining patches later today or tomorrow.
I am also aware of more pending patches.
Fortran: fix checks for STAT= and ERRMSG= arguments of SYNC ALL/SYNC IMAGES
gcc/fortran/ChangeLog:
PR fortran/99351
* match.c (sync_statement): Replace %v code by %e in gfc_match to
allow for function references as STAT and ERRMSG arguments.
* resolve.c (resolve_sync): Adjust checks of STAT= and ERRMSG= to
being definable arguments. Function references with a data
pointer result are accepted.
* trans-stmt.c (gfc_trans_sync): Adjust assertion.
gcc/testsuite/ChangeLog:
PR fortran/99351
* gfortran.dg/coarray_sync.f90: New test.
* gfortran.dg/coarray_3.f90: Adjust to change error messages.