Commit 8954606d by Jerry DeLisle

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
parent 017c243d
2018-03-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Dominique d'Humieres <dominiq@gcc.gnu.org>
PR fortran/84506
* 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.
2018-03-24 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/70068
......
......@@ -4037,10 +4037,9 @@ gfc_free_namespace (gfc_namespace *ns)
return;
ns->refs--;
if (ns->refs > 0)
return;
gcc_assert (ns->refs == 0);
if (ns->refs != 0)
return;
gfc_free_statements (ns->code);
......
2018-03-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/89497
* gfortran.dg/pr89497.f90: New test.
2018-03-24 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/70068
......
! { dg-do compile }
! PR89497
program p
block
do
end block ! { dg-error "Expecting END DO statement" }
end ! { dg-error "END DO statement expected" }
! { dg-excess-errors "Unexpected end of file" }
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