(grokparms): Copy arg type list to savable obstack if nec.

From-SVN: r2071
This commit is contained in:
Richard Stallman 1992-09-07 06:08:44 +00:00
parent bc690db148
commit 023de2924d
1 changed files with 14 additions and 1 deletions

View File

@ -4438,7 +4438,20 @@ grokparms (parms_info, funcdef_flag)
typelt = TREE_CHAIN (typelt);
}
return first_parm;
/* Allocate the list of types the way we allocate a type. */
if (allocation_temporary_p ())
{
/* Construct a copy of the list of types
on the saveable obstack. */
tree result = NULL;
for (typelt = first_parm; typelt; typelt = TREE_CHAIN (typelt))
result = saveable_tree_cons (NULL_TREE, TREE_VALUE (typelt),
result);
return nreverse (result);
}
else
/* The list we have is permanent already. */
return first_parm;
}
}