Commit 15319c3e by Mikael Morin

symbol.c (gfc_undo_symbols): Correctly undo namelists.

fortran/
	* symbol.c (gfc_undo_symbols): Correctly undo namelists.

testsuite/
	* gfortran.dg/namelist_75.f90: New test.

From-SVN: r191357
parent ca4a1c8c
2012-09-16 Mikael Morin <mikael@gcc.gnu.org>
* symbol.c (gfc_undo_symbols): Correctly undo namelists.
2012-09-15 Tobias Burnus <burnus@net-b.de>
* trans-io.c (gfc_trans_transfer): Add an assert.
......
......@@ -2996,7 +2996,7 @@ gfc_undo_symbols (void)
{
if (p->namelist_tail != old->namelist_tail)
{
gfc_free_namelist (old->namelist_tail);
gfc_free_namelist (old->namelist_tail->next);
old->namelist_tail->next = NULL;
}
}
......
2012-09-16 Mikael Morin <mikael@gcc.gnu.org>
* gfortran.dg/namelist_75.f90: New test.
2012-09-15 Tom de Vries <tom@codesourcery.com>
* gcc.dg/tree-ssa/vrp82.c: New test.
......
! { dg-do compile }
!
! Tests a write-after-free memory error fix in gfc_undo_symbols
program test_nml
namelist /foo/ bar, baz
namelist /foo/ wrong, , ! { dg-error "Syntax error in NAMELIST" }
end program test_nml
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