2005-01-22 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/19451
* io/transfer.c (finalize_transfer): Don't do anything if
there is an error condition.
* open_readonly_1.f90: New test.
From-SVN: r94101
+2005-01-22 Thomas Koenig <Thomas.Koenig@online.de>
+
+ PR libfortran/19451
+ * open_readonly_1.f90: New test.
+
2005-01-22 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/18982
--- /dev/null
+! { dg-do run }
+! PR19451
+! Writing to a non-empty readonly file caused a segfault.
+! We were still trying to write the EOR after an error ocurred
+program prog
+ open (unit=10, file='PR19451.dat')
+ write (10,*) "Hello World"
+ close (10)
+ open (unit=10, file='PR19451.dat', action="read")
+ write (10,*,err=20) "Hello World"
+ call abort()
+ 20 continue
+end program
+
+2005-01-22 Thomas Koenig <Thomas.Koenig@online.de>
+
+ PR libfortran/19451
+ * io/transfer.c (finalize_transfer): Don't do anything if
+ there is an error condition.
+
2005-01-22 David Edelsohn <edelsohn@gnu.org>
PR libgfortran/19052
static void
finalize_transfer (void)
{
+ if (ioparm.library_return != LIBRARY_OK)
+ return;
+
if ((ionml != NULL) && (ioparm.namelist_name != NULL))
{
if (ioparm.namelist_read_mode)