[Bug fortran/101399] Horizonal tab character not ignored on print statement

kargl at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jan 1 21:03:13 GMT 2026


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101399

--- Comment #6 from Steve Kargl <kargl at gcc dot gnu.org> ---
(In reply to Steve Kargl from comment #3)
> diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c
> index 40cd76eb585..8c3f841098f 100644
> --- a/gcc/fortran/io.c
> +++ b/gcc/fortran/io.c
> @@ -4226,7 +4226,10 @@ match_io (io_kind k)
>  
>        if (gfc_current_form == FORM_FREE)
>  	{
> -	  char c = gfc_peek_ascii_char ();
> +	  char c;
> +
> +	  gfc_gobble_whitespace ();
> +	  c = gfc_peek_ascii_char ();
>  	  if (c != ' ' && c != '*' && c != '\'' && c != '"')
>  	    {
>  	      m = MATCH_NO;
> 

This simple patch does not regression test cleanly.
Many of the failures are due to other work-a-rounds
for accepting invalid uses of a tab.


More information about the Gcc-bugs mailing list