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

--- Comment #29 from rguenther at suse dot de <rguenther at suse dot de> ---
On Mon, 8 Apr 2024, burnus at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114304
> 
> --- Comment #28 from Tobias Burnus <burnus at gcc dot gnu.org> ---
> Created attachment 57896
>   --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57896&action=edit
> Testcase
> 
> It seems as if 'tabs' cause problems, e.g. for:
> 
>  profile_single_file            = .true.
> 
> where there are two tabs before '='.
> 
> * * *
> 
> The problem seems to be that the new code uses:
> 
> -  eat_spaces (dtp);
>    dtp->u.p.comma_flag = 0;
> +  c = next_char (dtp);
> +  if (c == ' ')
> +    {
> +      eat_spaces (dtp);
> 
> Thus, it explicitly checks for ' ' while eat_spaces handles:
> 
>   while (c != EOF && (c == ' ' || c == '\r' || c == '\t'));
> 
> Testcase attached.
> 
> I think we need at least an "|| c == '\t'"; I guess '\r' isn't really required
> here, or is it?

Might be for \r\n line endings?  I'd keep it for the sake of preserving
previous behavior.  isspace(3) tests for \f, \n, \r, \t, \v and space
(but of course all depends on the locale, not sure whether libgfortran
needs to care for locales)

Reply via email to