https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123025
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anlauf at gcc dot gnu.org
--- Comment #3 from anlauf at gcc dot gnu.org ---
(In reply to Jerry DeLisle from comment #2)
> It would be helpful to catch the other cases.
Copying the check to the other branch does it:
diff --git a/gcc/fortran/decl.cc b/gcc/fortran/decl.cc
index 20260ec57ce..2b2a0e5aced 100644
--- a/gcc/fortran/decl.cc
+++ b/gcc/fortran/decl.cc
@@ -1210,6 +1229,10 @@ match_char_length (gfc_expr **expr, bool *deferred, bool
obsolescent_check)
if (m == MATCH_NO)
goto syntax;
+ if (obsolescent_check
+ && !gfc_notify_std (GFC_STD_F95_OBS, "Old-style character length at
%C"))
+ return MATCH_ERROR;
+
if (gfc_match_char (')') == MATCH_NO)
{
gfc_free_expr (*expr);