mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-11 03:56:53 +08:00
tree.c (save_tree_status): Revert 10 Sep change.
* tree.c (save_tree_status): Revert 10 Sep change. (restore_tree_status): Likewise. Call obstack_free with NULL before freeing the obstack proper. From-SVN: r29355
This commit is contained in:
parent
1497faf6be
commit
24554b03c6
@ -1,3 +1,9 @@
|
||||
Sat Sep 11 23:28:33 1999 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* tree.c (save_tree_status): Revert 10 Sep change.
|
||||
(restore_tree_status): Likewise. Call obstack_free with NULL
|
||||
before freeing the obstack proper.
|
||||
|
||||
Sat Sep 11 23:23:46 1999 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* cse.c (cse_main): If gc'ing, collect around cse_basic_block.
|
||||
|
11
gcc/tree.c
11
gcc/tree.c
@ -365,7 +365,8 @@ save_tree_status (p)
|
||||
function_maybepermanent_obstack
|
||||
= (struct obstack *) xmalloc (sizeof (struct obstack));
|
||||
gcc_obstack_init (function_maybepermanent_obstack);
|
||||
maybepermanent_firstobj = NULL;
|
||||
maybepermanent_firstobj
|
||||
= (char *) obstack_finish (function_maybepermanent_obstack);
|
||||
|
||||
function_obstack = (struct obstack *) xmalloc (sizeof (struct obstack));
|
||||
gcc_obstack_init (function_obstack);
|
||||
@ -394,14 +395,16 @@ restore_tree_status (p)
|
||||
/* Free saveable storage used by the function just compiled and not
|
||||
saved. */
|
||||
obstack_free (function_maybepermanent_obstack, maybepermanent_firstobj);
|
||||
if (obstack_empty_p (function_maybepermanent_obstack))
|
||||
{
|
||||
obstack_free (function_maybepermanent_obstack, NULL);
|
||||
free (function_maybepermanent_obstack);
|
||||
}
|
||||
|
||||
obstack_free (&temporary_obstack, temporary_firstobj);
|
||||
obstack_free (&momentary_obstack, momentary_function_firstobj);
|
||||
|
||||
obstack_free (function_obstack, NULL);
|
||||
|
||||
if (maybepermanent_firstobj == NULL)
|
||||
free (function_maybepermanent_obstack);
|
||||
free (function_obstack);
|
||||
|
||||
temporary_firstobj = p->temporary_firstobj;
|
||||
|
Loading…
Reference in New Issue
Block a user