Commit ce5458c2 by Jerry DeLisle

re PR libfortran/68987 (double free or corruption in _gfortran_st_write_done…

re PR libfortran/68987 (double free or corruption in _gfortran_st_write_done when a write statement to an internal file uses an invalid format and the ERR= specifier appears.)

2015-12-30  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/68987
	* gfortran.dg/error_format_2.f90: New test.

From-SVN: r232007
parent c2cb0f4b
2015-12-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/68987
* gfortran.dg/error_format_2.f90: New test.
2015-12-30 John David Anglin <danglin@gcc.gnu.org>
* gfortran.dg/coarray_40.f90: Revise to use dg-additional-options.
......
! { dg-do run }
! PR68987, this test case failed on a memory double free
program foo
call s('(foo)')
end program
subroutine s(fmt)
character (*) :: fmt
character (1) :: c
integer :: i
write (c, fmt, iostat=i) 42
! print *, i
if (i==0) call abort()
write (c, fmt, err=100) 42
call abort()
100 continue
end subroutine
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment