]> git.ipfire.org Git - thirdparty/gcc.git/commit
libfortran: Fix handling of formatted separators.
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Sat, 6 Apr 2024 02:25:13 +0000 (19:25 -0700)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Sat, 6 Apr 2024 13:55:45 +0000 (06:55 -0700)
commit93adf88cc6744aa2c732b765e1e3b96e66cb3300
treed39c79f18a09953b9d277139223c409a3df0d7e2
parent09992f8b881aa2dfbee1e9d6954c3ca90cd3fe41
libfortran: Fix handling of formatted separators.

PR libfortran/114304
PR libfortran/105473

libgfortran/ChangeLog:

* io/list_read.c (eat_separator): Add logic to handle spaces
preceding a comma or semicolon such that that a 'null' read
occurs without error at the end of comma or semicolon
terminated input lines. Add check and error message for ';'.
(list_formatted_read_scalar): Treat comma as a decimal point
when specified by the decimal mode on the first item.

gcc/testsuite/ChangeLog:

* gfortran.dg/pr105473.f90: Modify to verify new error message.
* gfortran.dg/pr114304.f90: New test.
gcc/testsuite/gfortran.dg/pr105473.f90
gcc/testsuite/gfortran.dg/pr114304.f90 [new file with mode: 0644]
libgfortran/io/list_read.c