]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: check for non-optional spaces between adjacent keywords
authorHarald Anlauf <anlauf@gmx.de>
Sun, 8 May 2022 20:04:27 +0000 (22:04 +0200)
committerHarald Anlauf <anlauf@gmx.de>
Mon, 9 May 2022 18:14:33 +0000 (20:14 +0200)
commit8c97f7fd2382aa77f36567207e949447db90a1fb
tree4f9e0d398c2a7059e7a102b47e5f46b0f8b960c3
parent8a39c7c128dbf4405821778724c5a1017ab12e06
Fortran: check for non-optional spaces between adjacent keywords

In free format, spaces between adjacent keywords are not optional except
when a combination is explicitly listed (e.g. F2018: table 6.2).  The
following combinations thus require separating blanks: CHANGE TEAM,
ERROR STOP, EVENT POST, EVENT WAIT, FAIL IMAGE, FORM TEAM, SELECT RANK,
SYNC ALL, SYNC IMAGES, SYNC MEMORY, SYNC TEAM, TYPE IS.

gcc/fortran/ChangeLog:

PR fortran/105501
* match.cc (gfc_match_if): Adjust patterns used for matching.
(gfc_match_select_rank): Likewise.
* parse.cc (decode_statement): Likewise.

gcc/testsuite/ChangeLog:

PR fortran/105501
* gfortran.dg/pr105501.f90: New test.
gcc/fortran/match.cc
gcc/fortran/parse.cc
gcc/testsuite/gfortran.dg/pr105501.f90 [new file with mode: 0644]