aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-09-07 06:08:44 +0000
committerRichard Stallman <rms@gnu.org>1992-09-07 06:08:44 +0000
commit023de2924d8a61678948ea7a46de9f946a1d0a8f (patch)
treeaae42aff2b57cae2a8be51fea687e032e646d366
parentbc690db148f86489ae3ffd105ddde3f0638a6ba5 (diff)
downloadgcc-023de2924d8a61678948ea7a46de9f946a1d0a8f.zip
gcc-023de2924d8a61678948ea7a46de9f946a1d0a8f.tar.gz
gcc-023de2924d8a61678948ea7a46de9f946a1d0a8f.tar.bz2
(grokparms): Copy arg type list to savable obstack if nec.
From-SVN: r2071
-rw-r--r--gcc/c-decl.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 936b8ea..fb92504 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -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;
}
}