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
+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
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
--- /dev/null
+! { 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" }