https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123025
Steve Kargl <kargl at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kargl at gcc dot gnu.org
--- Comment #4 from Steve Kargl <kargl at gcc dot gnu.org> ---
(In reply to anlauf from comment #3)
> (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);
I have been testing the same patch!
It causes 50-ish regressions in the testsuite due to -pedantic-errors
being added to 'dg-do run' without 'dg-options yada yada'