diff options
author | Harald Anlauf <anlauf@gmx.de> | 2021-08-15 20:13:11 +0200 |
---|---|---|
committer | Harald Anlauf <anlauf@gmx.de> | 2021-08-15 20:13:11 +0200 |
commit | bbf19f9c20515da9fcd23f08c8139427374e8d77 (patch) | |
tree | bef0ccd8bb64afb5e6d7d781edd6829dcf9f7df3 /gcc/fortran/match.c | |
parent | 34ce7f7a9a64dd69dd6a77dfd4a77406c3c71014 (diff) | |
download | gcc-bbf19f9c20515da9fcd23f08c8139427374e8d77.zip gcc-bbf19f9c20515da9fcd23f08c8139427374e8d77.tar.gz gcc-bbf19f9c20515da9fcd23f08c8139427374e8d77.tar.bz2 |
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 error messages.
Diffstat (limited to 'gcc/fortran/match.c')
-rw-r--r-- | gcc/fortran/match.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index b110548..16502da 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -3855,7 +3855,7 @@ sync_statement (gfc_statement st) for (;;) { - m = gfc_match (" stat = %v", &tmp); + m = gfc_match (" stat = %e", &tmp); if (m == MATCH_ERROR) goto syntax; if (m == MATCH_YES) @@ -3875,7 +3875,7 @@ sync_statement (gfc_statement st) break; } - m = gfc_match (" errmsg = %v", &tmp); + m = gfc_match (" errmsg = %e", &tmp); if (m == MATCH_ERROR) goto syntax; if (m == MATCH_YES) |