[PATCH] fortran/24958,25146 -- internal error caused by invalid NULLIFY

Steve Kargl sgk@troutmask.apl.washington.edu
Sun Jan 15 20:28:00 GMT 2006


I've compiled and regression tested the attach patch
on i386-*-freebsd.  There were no new regression.  If
no one has an objection, I will commit this patch within
the next 24 hours.  If someone wants to review and OK
the patch sooner than the 24 hours time, I'll be a happy
camper.

2006-01-15  Steven G. Kargl  <kargls@comcast.net>

	* match.c (gfc_match_nullify): Free the list from head not tail.

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

-- 
Steve
-------------- next part --------------
Index: match.c
===================================================================
--- match.c	(revision 109696)
+++ match.c	(working copy)
@@ -1887,7 +1887,7 @@ syntax:
   gfc_syntax_error (ST_NULLIFY);
 
 cleanup:
-  gfc_free_statements (tail);
+  gfc_free_statements (new_st.next);
   return MATCH_ERROR;
 }
 
-------------- next part --------------
! { dg-do compile }
! PR fortran/25146
program i
   implicit none
   TYPE (a) t1     ! { dg-error "is being used before" }
   nullify(t1%x)   ! { dg-error "error in NULLIFY" }
end program


More information about the Fortran mailing list