From: Jerry D <jvdelisle2@gmail.com>
To: Tobias Burnus <tburnus@baylibre.com>, gfortran <fortran@gcc.gnu.org>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>, Jerry D <jvdelisle2@gmail.com>
Subject: Re: [patch, libgfortran] PR114304 - [13/14 Regression] libgfortran I/O – bogus "Semicolon not allowed as separator with DECIMAL='point'"
Date: Fri, 5 Apr 2024 10:47:04 -0700 [thread overview]
Message-ID: <6a742cef-5321-4b34-a2f0-870abd1ba82a@gmail.com> (raw)
In-Reply-To: <15a39ada-c7fc-433d-ab39-19b897a8a3e8@baylibre.com>
On 4/4/24 2:41 PM, Tobias Burnus wrote:
> Hi Jerry,
>
> I think for the current testcases, I like the patch – the question is
> only what's about:
>
> ',3' as input for 'comma' (or '.3' as input for 'point')
>
> For 'point' – 0.3 is read and ios = 0 (as expected)
> But for 'comma':
> * GCC 12 reads nothing and has ios = 0.
> * GCC 13/mainline has an error (ios != 0 – and reads nothing)
> * GCC with your patch: Same result: ios != 0 and nothing read.
>
> Expected: Same as with ','/'comma' – namely: read-in value is 0.3.
> → https://godbolt.org/z/4rc8fz4sT for the full example, which works with
> ifort, ifx and flang
>
> * * *
>
> Can you check and fix this? It looks perfectly valid to me to have
> remove the '0' in the floating point numbers '0.3' or '0,3' seems to be
> permitted – and it works for '.' (with 'point') but not for ',' (with
> 'comma').
>
Yes, I found the spot to fix this.
> F2023's "13.10.3.1 List-directed input forms" refers to "13.7.2.3.2 F
> editing", which states:
>
> "The standard form of the input field [...] The form of the mantissa is
> an optional sign, followed by a string of one or more digits optionally
> containing a decimal symbol."
>
> The latter does not require that the digit has to be before the decimal
> sign and as for output, it is optional, it is surely intended that ",3"
> is a valid floating-point number for decimal='comma'.
>
Agree
> * * *
>
> I extended the testcase to check for this – see attached diff. All
> 'point' work, all 'comma' fail.
>
> Thanks for working on this!
>
> Tobias
Thanks much. After I fix it, I will use your extended test case in the
test suite.
Jerry -
next prev parent reply other threads:[~2024-04-05 17:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-04 1:33 Jerry D
2024-04-04 8:17 ` Paul Richard Thomas
2024-04-04 9:31 ` Tobias Burnus
2024-04-04 20:05 ` Jerry D
2024-04-04 21:04 ` Jerry D
2024-04-04 21:41 ` Tobias Burnus
2024-04-05 17:47 ` Jerry D [this message]
2024-04-06 2:38 ` Jerry D
2024-04-06 5:17 ` Tobias Burnus
2024-04-08 9:53 ` [Patch] Fortran: List-directed read - accept again tab as alternative to space as separator [PR114304] (was: [patch, libgfortran] PR114304 - [13/14 Regression] libgfortran I/O – bogus "Semicolon not allowed as separator with DECIMAL='point'") Tobias Burnus
2024-04-08 18:21 ` [Patch] Fortran: List-directed read - accept again tab as alternative to space as separator [PR114304] Jerry D
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6a742cef-5321-4b34-a2f0-870abd1ba82a@gmail.com \
--to=jvdelisle2@gmail.com \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=tburnus@baylibre.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).