public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libfortran/114304] [13/14 Regression] libgfortran I/O – bogus "Semicolon not allowed as separator with DECIMAL='point'"
Date: Tue, 12 Mar 2024 08:52:19 +0000 [thread overview]
Message-ID: <bug-114304-4-WgNgIcKwdW@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-114304-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114304
--- Comment #14 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Created attachment 57680
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57680&action=edit
Testcase with decimal=COMMA, passes with ifort/ifx/flang - fails with gfortran
> commit r14-9432-g0c179654c3170749f3fb3232f2442fcbc99bffbb
> commit r13-8417-g824a71f609b37a8121793075b175e2bbe14fdb82
Thanks for the fix.
We are now back to the GCC 13 result → comment 4
Namely, attachment 57668 now gives:
1.23434997 1243.23999 13.2399998 a
1.23434997 1243.23999 13.2399998 a
1.23434997 1243.23999 13.2399998
1.23434997 1243.23999 13.2399998
At line 33 of file foo.f90 (unit = 99, file = 'foo.inp')
* * *
The question is whether the following show give an error as shown above:
real :: x(3)
character(len=1) :: s
...
write(99, '(a)') '1.23435 1243.24 13.24 ;'
read(99, *) x, s
Or whether reading this line should work, i.e. reading ';' as character – as it
does with ifort and flang.
Or in other words:
* Does ';' count as character, readable by list-directed formatted I/O? (ifort,
ifx, flang)
* Or doesn't it? (gfortran since at least 4.9)
* * *
In F2023 (23-007r1), "13.10.2 Values and value separators":
"A value separator is
• a comma optionally preceded by one or more contiguous blanks and
optionally followed by one or more contiguous blanks,
unless the decimal edit mode is COMMA, in which case a semicolon is
used in place of the comma,
• a slash optionally preceded by one or more contiguous blanks and
optionally followed by one or more contiguous blanks, or
• one or more contiguous blanks between two nonblank values
or following the last nonblank value, where a nonblank value
is a constant, an r*c form, or an r* form."
(where 'r' is an positive integer and 'c' is a literal constant [with ...].)
To me it reads as if the semicolon should be read just fine.
* * *
I now have tried another testcase with decimal=COMMA, which works just fine
with ifort / ifx /flang as shown at
https://godbolt.org/z/ajeTjzEfY
But with GCC it fails with:
Fortran runtime error: Comma not allowed as separator with DECIMAL='comma'
See godbolt link above for gfortran vs. ifort vs. ifx. vs. flang
or the attached testcase.
next prev parent reply other threads:[~2024-03-12 8:52 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-11 11:40 [Bug libfortran/114304] New: [14 Regression] Rejects lapack test rguenth at gcc dot gnu.org
2024-03-11 11:42 ` [Bug libfortran/114304] " rguenth at gcc dot gnu.org
2024-03-11 11:52 ` rguenth at gcc dot gnu.org
2024-03-11 12:26 ` burnus at gcc dot gnu.org
2024-03-11 12:31 ` burnus at gcc dot gnu.org
2024-03-11 12:51 ` [Bug libfortran/114304] [14 Regression] libgfortran I/O – bogus "Semicolon not allowed as separator with DECIMAL='point'" burnus at gcc dot gnu.org
2024-03-11 16:41 ` burnus at gcc dot gnu.org
2024-03-11 17:27 ` [Bug libfortran/114304] [13/14 " jvdelisle at gcc dot gnu.org
2024-03-11 18:18 ` jvdelisle at gcc dot gnu.org
2024-03-11 19:03 ` jvdelisle at gcc dot gnu.org
2024-03-11 19:13 ` rguenther at suse dot de
2024-03-11 21:12 ` jvdelisle at gcc dot gnu.org
2024-03-11 22:24 ` cvs-commit at gcc dot gnu.org
2024-03-11 22:45 ` cvs-commit at gcc dot gnu.org
2024-03-12 8:52 ` burnus at gcc dot gnu.org [this message]
2024-03-12 16:42 ` jvdelisle at gcc dot gnu.org
2024-03-13 13:39 ` [Bug libfortran/114304] " law at gcc dot gnu.org
2024-03-13 19:32 ` jvdelisle at gcc dot gnu.org
2024-03-14 3:02 ` law at gcc dot gnu.org
2024-03-14 9:26 ` [Bug libfortran/114304] [13/14 Regression] " burnus at gcc dot gnu.org
2024-03-14 15:56 ` jvdelisle at gcc dot gnu.org
2024-03-15 15:00 ` law at gcc dot gnu.org
2024-03-15 23:51 ` jvdelisle at gcc dot gnu.org
2024-04-06 13:56 ` cvs-commit at gcc dot gnu.org
2024-04-08 6:03 ` chenglulu at loongson dot cn
2024-04-08 7:24 ` rguenth at gcc dot gnu.org
2024-04-08 7:49 ` rguenth at gcc dot gnu.org
2024-04-08 8:06 ` rguenth at gcc dot gnu.org
2024-04-08 8:09 ` rguenth at gcc dot gnu.org
2024-04-08 8:38 ` burnus at gcc dot gnu.org
2024-04-08 9:36 ` rguenther at suse dot de
2024-04-08 10:00 ` burnus at gcc dot gnu.org
2024-04-08 19:48 ` cvs-commit at gcc dot gnu.org
2024-04-08 20:07 ` jvdelisle at gcc dot gnu.org
2024-04-08 20:15 ` jvdelisle at gcc dot gnu.org
2024-04-22 4:23 ` cvs-commit at gcc dot gnu.org
2024-04-22 4:29 ` jvdelisle at gcc dot gnu.org
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=bug-114304-4-WgNgIcKwdW@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/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).