[Bug fortran/101627] List-directed read with trailing characters after quotes
kargl at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jul 29 16:34:15 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101627
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2021-07-29
Priority|P3 |P4
Ever confirmed|0 |1
--- Comment #2 from kargl at gcc dot gnu.org ---
Here a correct patch, which has been regression tested.
diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c
index 8cc7ddbe8e2..b551f2b9843 100644
--- a/libgfortran/io/list_read.c
+++ b/libgfortran/io/list_read.c
@@ -1258,7 +1258,7 @@ read_character (st_parameter_dt *dtp, int length
__attribute__ ((unused)))
done:
c = next_char (dtp);
done_eof:
- if (is_separator (c) || c == EOF)
+ if (quote == '"' || quote == '\'' || is_separator (c) || c == EOF)
{
unget_char (dtp, c);
eat_separator (dtp);
More information about the Gcc-bugs
mailing list