re PR fortran/69497 (ICE in gfc_free_namespace, at fortran/symbol.c:3701)
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Sun, 25 Mar 2018 03:47:28 +0000 (03:47 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Sun, 25 Mar 2018 03:47:28 +0000 (03:47 +0000)
commit8954606d17ebf8b6f26e856a9def11a4c674cb1b
treee2427cebad4c4ef6918a10f4f2bce9d25fcd62f7
parent017c243dff144d1f0b2e93d999bc5d7bb763bd27
re PR fortran/69497 (ICE in gfc_free_namespace, at fortran/symbol.c:3701)

2018-03-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
    Dominique d'Humieres  <dominiq@gcc.gnu.org>

PR fortran/89497
* symbol.c (gfc_free_namespace): Delete the assert and only if
refs count is equals zero, free the namespace. Otherwise,
something is halfway and other errors will resound.

* gfortran.dg/pr89497.f90: New test.

Co-Authored-By: Dominique d'Humieres <dominiq@gcc.gnu.org>
From-SVN: r258839
gcc/fortran/ChangeLog
gcc/fortran/symbol.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pr69497.f90 [new file with mode: 0644]