aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJ. David Anglin <dave@hiauly1.hia.nrc.ca>2000-07-12 04:26:07 +0000
committerJeff Law <law@gcc.gnu.org>2000-07-11 22:26:07 -0600
commit5c6f90e71a8f9e1d40fe935cf1cad6f0f8be5e6d (patch)
tree46472fdd9aa5981a3348a2f99601554da39a68d0 /gcc
parent31d432e47fac88134d8b2e9ebefbd25c5293f6fd (diff)
downloadgcc-5c6f90e71a8f9e1d40fe935cf1cad6f0f8be5e6d.zip
gcc-5c6f90e71a8f9e1d40fe935cf1cad6f0f8be5e6d.tar.gz
gcc-5c6f90e71a8f9e1d40fe935cf1cad6f0f8be5e6d.tar.bz2
pa.c (hppa_encode_label): Store labels in gc memory when ggc_p is true.
* pa.c (hppa_encode_label): Store labels in gc memory when ggc_p is true. From-SVN: r34979
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/config/pa/pa.c11
2 files changed, 10 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ec4747d..7b3b1fa 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -4,6 +4,9 @@
2000-07-11 J. David Anglin <dave@hiauly1.hia.nrc.ca>
+ * pa.c (hppa_encode_label): Store labels in gc memory when ggc_p is
+ true.
+
* aclocal.m4 (AC_FUNC_MMAP_ANYWHERE): Extend test to detect systems
with MAP_ANONYMOUS and MAP_ANON.
* configure, config.in: Rebuilt.
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index d9b7f8e..35689b8 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -5951,9 +5951,9 @@ output_call (insn, call_dest, sibcall)
space), and special magic is needed to construct their address.
For reasons too disgusting to describe storage for the new name
- is allocated either on the saveable_obstack (released at function
- exit) or on the permanent_obstack for things that can never change
- (libcall names for example). */
+ is allocated as a ggc string, or as a string on the saveable_obstack
+ (released at function exit) or on the permanent_obstack for things
+ that can never change (libcall names for example). */
void
hppa_encode_label (sym, permanent)
@@ -5964,7 +5964,10 @@ hppa_encode_label (sym, permanent)
int len = strlen (str);
char *newstr;
- newstr = obstack_alloc ((permanent ? &permanent_obstack : saveable_obstack),
+ if (ggc_p)
+ newstr = ggc_alloc_string (NULL, len + 1);
+ else
+ newstr = obstack_alloc ((permanent ? &permanent_obstack : saveable_obstack),
len + 2);
if (str[0] == '*')