https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123012
Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2026-01-08
Ever confirmed|0 |1
--- Comment #4 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
Preliminary patch.
diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c
index ccce4e44a4f..2aadc8f4d3c 100644
--- a/libgfortran/io/list_read.c
+++ b/libgfortran/io/list_read.c
@@ -1314,6 +1314,12 @@ read_character (st_parameter_dt *dtp, int length
__attribute__ ((unused)))
CASE_SEPARATORS:
case EOF:
+ if (dtp->u.p.namelist_mode)
+ {
+ snprintf (message, IOMSG_LEN, "Missing quote while reading item
%d",
+ dtp->u.p.item_count);
+ generate_error (&dtp->common, LIBERROR_READ_VALUE, message);
+ }
unget_char (dtp, c);
goto done; /* String was only digits! */
This regression tests fine. Without the check for namelist mode there are two
existing tests that fail. I want to think a bit about those two cases and
whether those two tests are valid. (dtio_12.f90 and eof_4.f90)