aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorMikael Morin <mikael@gcc.gnu.org>2012-09-16 11:26:52 +0000
committerMikael Morin <mikael@gcc.gnu.org>2012-09-16 11:26:52 +0000
commit15319c3ed9c09f632012dee8f2719059b1e3fff2 (patch)
tree71514bb43dbf4afb2a194ae5b23ed665e265c68b /gcc/fortran
parentca4a1c8cb9d8239f01b37a5ce19be791d4ab1743 (diff)
downloadgcc-15319c3ed9c09f632012dee8f2719059b1e3fff2.zip
gcc-15319c3ed9c09f632012dee8f2719059b1e3fff2.tar.gz
gcc-15319c3ed9c09f632012dee8f2719059b1e3fff2.tar.bz2
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
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog4
-rw-r--r--gcc/fortran/symbol.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 6259229..f363d59 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,7 @@
+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.
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c
index d68208d..c914e65 100644
--- a/gcc/fortran/symbol.c
+++ b/gcc/fortran/symbol.c
@@ -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;
}
}