aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2025-09-02 15:58:26 -0700
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2025-09-02 15:58:26 -0700
commit071b4126c613881f4cb25b4e5c39032964827f88 (patch)
tree7ed805786566918630d1d617b1ed8f7310f5fd8e /libgfortran/io
parent845d23f3ea08ba873197c275a8857eee7edad996 (diff)
parentcaa1c2f42691d68af4d894a5c3e700ecd2dba080 (diff)
downloadgcc-devel/gfortran-test.zip
gcc-devel/gfortran-test.tar.gz
gcc-devel/gfortran-test.tar.bz2
Merge branch 'master' into gfortran-testdevel/gfortran-test
Diffstat (limited to 'libgfortran/io')
-rw-r--r--libgfortran/io/list_read.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c
index 83124b5..7c22f61 100644
--- a/libgfortran/io/list_read.c
+++ b/libgfortran/io/list_read.c
@@ -1262,6 +1262,11 @@ read_character (st_parameter_dt *dtp, int length __attribute__ ((unused)))
if ((c = next_char (dtp)) == EOF)
goto eof;
+ if (c == ';')
+ {
+ push_char (dtp, c);
+ goto get_string;
+ }
switch (c)
{
CASE_DIGITS:
@@ -1294,6 +1299,13 @@ read_character (st_parameter_dt *dtp, int length __attribute__ ((unused)))
for (;;)
{
c = next_char (dtp);
+
+ if (c == ';')
+ {
+ push_char (dtp, c);
+ goto get_string;
+ }
+
switch (c)
{
CASE_DIGITS:
@@ -1323,6 +1335,13 @@ read_character (st_parameter_dt *dtp, int length __attribute__ ((unused)))
if ((c = next_char (dtp)) == EOF)
goto eof;
+
+ if (c == ';')
+ {
+ push_char (dtp, c);
+ goto get_string;
+ }
+
switch (c)
{
CASE_SEPARATORS:
@@ -1346,6 +1365,13 @@ read_character (st_parameter_dt *dtp, int length __attribute__ ((unused)))
{
if ((c = next_char (dtp)) == EOF)
goto done_eof;
+
+ if (c == ';')
+ {
+ push_char (dtp, c);
+ continue;
+ }
+
switch (c)
{
case '"':
@@ -2275,6 +2301,8 @@ list_formatted_read_scalar (st_parameter_dt *dtp, bt type, void *p,
}
if (c == ',' && dtp->u.p.current_unit->decimal_status == DECIMAL_COMMA)
c = '.';
+ if (c == ';' && dtp->u.p.current_unit->decimal_status == DECIMAL_POINT)
+ unget_char (dtp, c);
else if (is_separator (c))
{
/* Found a null value. */