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: Thu, 14 Mar 2024 09:26:51 +0000	[thread overview]
Message-ID: <bug-114304-4-nV3CIJE2V5@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 #19 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Regarding the LAPACK issue:

Actually, I am inclined to
* regard it as LAPACK bug
* that was also fixed upstream, see comment 6, to make g95 happy.
as ';' is not a value separator - while ' ;' is fine, where the blank is a
value separator.

My testcase of comment 4 therefore always used a space before the ',' / ';'.

* * *

I have now created an extended testcase, attached to PR105473 as attachment
57695. (Only testing integer/real parsing, not reading the char afterward as in
comment 4.)

The same testcase can also be found at https://godbolt.org/z/14h48167W and
shows the result with gfortran, ifort, ifx and flag. I used this result to add
comments to the testcases.

* * *

For some F2023 wording, see comment 14 above.

And I have to admit that I am rather confused by the results as there does not
seem to be any consistent pattern; there are cases where I agree with
gfortran's error even though neither ifort nor flang show one, while for
others, I think gfortran gets it wrong.

In particular, I think for the following cases:

  call t('point', ';') ! gfortran: no error, others: error
→ IMHO invalid: not a value separator and not an integer.

  call t('point', '5;') ! gfortran: no error shown, others: error
→ This is the LAPACK example but for integers.
  I think ';' is invalid as it is not part of the integer but also not a value
separator.

  call t('comma', '7 ,') ! gfortran: error; others: no error
→ IMHO valid - I think the ' ' as value separator is sufficient.

  call t('point', '3.3,', .true.) ! gfortran/flag: error shown; ifort: no error
→ What's wrong with a comma as value separator?

  call t('comma', '3,3;', .true.) ! gfortran: error shown; others: no error
→ Same, except that ';' is now the value separator


But in the following cases, I think gfortran is *right*:
  call t('point', '5.') ! gfortran/flang: Error shown, ifort: no error
→ '.' is not part of an integer nor a value separator

  call t('comma', '5,') ! gfortran: error; others: no error
→ Likewise for ',' - the ',' is not part of an integer nor a value separator


Disclaimer: I might have easily overlooked some fine print.

  parent reply	other threads:[~2024-03-14  9:26 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
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 ` burnus at gcc dot gnu.org [this message]
2024-03-14 15:56 ` [Bug libfortran/114304] [13/14 Regression] " 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-nV3CIJE2V5@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).