libgfortran: [PR105473] Fix checks for decimal='comma'.
commita71d87431d0c4e04a402ef6566be090c470b2b53
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Sat, 17 Feb 2024 17:24:58 +0000 (17 09:24 -0800)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Sat, 17 Feb 2024 18:03:43 +0000 (17 10:03 -0800)
tree33ac62cc66484ec077fdab31654485e50c66e30e
parent296284a9dbb7df4485cc5f1d3e975fdb4b8a10b8
libgfortran: [PR105473] Fix checks for decimal='comma'.

PR libfortran/105473

libgfortran/ChangeLog:

* io/list_read.c (eat_separator): Reject comma as a
seprator when it is being used as a decimal point.
(parse_real): Reject a '.' when is should be a comma.
(read_real): Likewise.
* io/read.c (read_f): Add more checks for ',' and '.'
conditions.

gcc/testsuite/ChangeLog:

* gfortran.dg/pr105473.f90: New test.
gcc/testsuite/gfortran.dg/pr105473.f90 [new file with mode: 0644]
libgfortran/io/list_read.c
libgfortran/io/read.c