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);