* [Bug fortran/105501] The statement TYPE IS without a space is accepted
2022-05-06 7:31 [Bug fortran/105501] New: The statement TYPE IS without a space is accepted chilikin.k at gmail dot com
@ 2022-05-06 20:34 ` anlauf at gcc dot gnu.org
2022-05-06 20:51 ` anlauf at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-05-06 20:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105501
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2022-05-06
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #1 from anlauf at gcc dot gnu.org ---
Confirmed. Intel and NAG reject the testcase, too.
In F2018, the mentioned table is:
Table 6.2: Adjacent keywords where separating blanks are optional
In does neither mention TYPE IS nor CLASS IS.
However, CLASSIS (CLASS IS w/o blanks) is properly rejected.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/105501] The statement TYPE IS without a space is accepted
2022-05-06 7:31 [Bug fortran/105501] New: The statement TYPE IS without a space is accepted chilikin.k at gmail dot com
2022-05-06 20:34 ` [Bug fortran/105501] " anlauf at gcc dot gnu.org
@ 2022-05-06 20:51 ` anlauf at gcc dot gnu.org
2022-05-08 20:18 ` anlauf at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-05-06 20:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105501
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anlauf at gcc dot gnu.org
--- Comment #2 from anlauf at gcc dot gnu.org ---
Untested patch:
diff --git a/gcc/fortran/parse.cc b/gcc/fortran/parse.cc
index e6e915d2a5e..f1fa7feb5a9 100644
--- a/gcc/fortran/parse.cc
+++ b/gcc/fortran/parse.cc
@@ -571,7 +571,7 @@ decode_statement (void)
case 't':
match ("target", gfc_match_target, ST_ATTR_DECL);
match ("type", gfc_match_derived_decl, ST_DERIVED_DECL);
- match ("type is", gfc_match_type_is, ST_TYPE_IS);
+ match ("type% is", gfc_match_type_is, ST_TYPE_IS);
break;
case 'u':
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/105501] The statement TYPE IS without a space is accepted
2022-05-06 7:31 [Bug fortran/105501] New: The statement TYPE IS without a space is accepted chilikin.k at gmail dot com
2022-05-06 20:34 ` [Bug fortran/105501] " anlauf at gcc dot gnu.org
2022-05-06 20:51 ` anlauf at gcc dot gnu.org
@ 2022-05-08 20:18 ` anlauf at gcc dot gnu.org
2022-05-09 19:36 ` cvs-commit at gcc dot gnu.org
2022-05-09 19:38 ` anlauf at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-05-08 20:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105501
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |anlauf at gcc dot gnu.org
--- Comment #3 from anlauf at gcc dot gnu.org ---
Extended patch: https://gcc.gnu.org/pipermail/fortran/2022-May/057839.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/105501] The statement TYPE IS without a space is accepted
2022-05-06 7:31 [Bug fortran/105501] New: The statement TYPE IS without a space is accepted chilikin.k at gmail dot com
` (2 preceding siblings ...)
2022-05-08 20:18 ` anlauf at gcc dot gnu.org
@ 2022-05-09 19:36 ` cvs-commit at gcc dot gnu.org
2022-05-09 19:38 ` anlauf at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-09 19:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105501
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Harald Anlauf <anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:8c97f7fd2382aa77f36567207e949447db90a1fb
commit r13-216-g8c97f7fd2382aa77f36567207e949447db90a1fb
Author: Harald Anlauf <anlauf@gmx.de>
Date: Sun May 8 22:04:27 2022 +0200
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/105501] The statement TYPE IS without a space is accepted
2022-05-06 7:31 [Bug fortran/105501] New: The statement TYPE IS without a space is accepted chilikin.k at gmail dot com
` (3 preceding siblings ...)
2022-05-09 19:36 ` cvs-commit at gcc dot gnu.org
@ 2022-05-09 19:38 ` anlauf at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-05-09 19:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105501
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |13.0
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #5 from anlauf at gcc dot gnu.org ---
Fixed for gcc-13. Closing.
Thanks for the report!
^ permalink raw reply [flat|nested] 6+ messages in thread