[Bug fortran/118793] request NAMELIST reports of input errors indicate position of error and show line containing error
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jun 25 20:48:36 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118793
--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jerry DeLisle <jvdelisle@gcc.gnu.org>:
https://gcc.gnu.org/g:523be91d54c05016ee09c2f7ffc74d35f56e48e5
commit r17-1907-g523be91d54c05016ee09c2f7ffc74d35f56e48e5
Author: Jerry DeLisle <jvdelisle@gcc.gnu.org>
Date: Tue Jun 23 18:17:27 2026 -0700
fortran: [PR118793] Provide expanded diagnostics for namelist read
The change implements additional diagnostic information for namelist
read. In particular, error messages provide line number, column
position, the specific file name, and a portion of the input line
where the error ocurred.
PR libfortran/118793
libgfortran/ChangeLog:
* io/file_pos.c (st_rewind): Reset line and column numbers.
* io/io.h: Add line and column number to the gfc_unit
structure.
* io/list_read.c (next_char_default): Increment the column
position and line number as needed.
(next_char_internal): Likewise.
(next_char_utf8): Likewise.
(nml_err_ret): Build the expanded diagnostic message.
* io/unit.c (insert_unit): Initialize the line_number.
gcc/testsuite/ChangeLog:
* gfortran.dg/namelist_40.f90: Update expected dg-output.
* gfortran.dg/namelist_47.f90: Likewise
More information about the Gcc-bugs
mailing list