]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: Fix handling of parsed format strings.
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Sat, 31 May 2025 15:57:22 +0000 (08:57 -0700)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Sun, 1 Jun 2025 23:40:50 +0000 (16:40 -0700)
commit5ff48aabf76c8913c013f233d3f42bb217a16e7b
tree8dd790b34417fedd02f99deec3182e34220af962
parent7624186f5f2e3fa6b3792c4af7136caea37e1ef2
Fortran: Fix handling of parsed format strings.

Previously parsed strings with errors were being cached such
that subsequent use of the format string were not being
checked for errors.

PR libfortran/119856

libgfortran/ChangeLog:

* io/format.c (parse_format_list): Set the fmt->error
message for missing comma.
(parse_format): Do not cache the parsed format string
if a previous error ocurred.

gcc/testsuite/ChangeLog:

* gfortran.dg/pr119856.f90: New test.
gcc/testsuite/gfortran.dg/pr119856.f90 [new file with mode: 0644]
libgfortran/io/format.c