https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88776
--- Comment #5 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> --- So far this patch seems to test OK. diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c index 4a7ccb3ddd5..d9af255a034 100644 --- a/libgfortran/io/list_read.c +++ b/libgfortran/io/list_read.c @@ -3614,11 +3614,7 @@ find_nml_name: while (!dtp->u.p.input_complete) { if (!nml_get_obj_data (dtp, &prev_nl, nml_err_msg, sizeof nml_err_msg)) - { - if (dtp->u.p.current_unit->unit_number != options.stdin_unit) - goto nml_err_ret; - generate_error (&dtp->common, LIBERROR_READ_VALUE, nml_err_msg); - } + goto nml_err_ret; /* Reset the previous namelist pointer if we know we are not going to be doing multiple reads within a single namelist object. */ All our current namelist tests pass. We shoud check this against an actual redirection to stdin which we do not do in our testsuite, but I cannot think of a reason why it would not be OK. (ie cat file | ./a.out )