free(NULL) fix

Philippe De Muyter phdm@macqel.be
Sun Oct 31 07:54:00 GMT 1999


Symptom :
xgcc: Internal compiler error: program cc1 got fatal signal 11

Fix :
Sun Oct 31 16:00:59 1999  Philippe De Muyter  <phdm@macqel.be>

	* function.c (free_after_compilation): Check if `x_parm_reg_stack_loc'
	is non-NULL before calling `free'.

--- ./gcc/function.c	Sun Oct 31 13:09:54 1999
+++ ./gcc/function.c	Thu Oct 21 16:50:41 1999
@@ -426,7 +426,8 @@ free_after_compilation (f)
   if (free_machine_status)
     (*free_machine_status) (f);
 
-  free (f->x_parm_reg_stack_loc);
+  if (f->x_parm_reg_stack_loc)
+    free (f->x_parm_reg_stack_loc);
 
   f->arg_offset_rtx = NULL;
   f->return_rtx = NULL;


More information about the Gcc-patches mailing list