aboutsummaryrefslogtreecommitdiff
path: root/gcc/profile.c
diff options
context:
space:
mode:
authorAlex Samuel <samuel@gcc.gnu.org>1999-09-22 05:51:44 +0000
committerAlex Samuel <samuel@gcc.gnu.org>1999-09-22 05:51:44 +0000
commit21a427cca1eaaf8757782354be2f0917a89fea25 (patch)
treed77f393f094055cf54780770525095be9da9ac8a /gcc/profile.c
parent5ab00e275b539136f48c62b2363936e92d4272c0 (diff)
downloadgcc-21a427cca1eaaf8757782354be2f0917a89fea25.zip
gcc-21a427cca1eaaf8757782354be2f0917a89fea25.tar.gz
gcc-21a427cca1eaaf8757782354be2f0917a89fea25.tar.bz2
Various fixes for problems discovered stress-testing GC.
* config/i386/i386.c (pic_label_name): Change to char pointer. (global_offset_table): New variable. (load_pic_register): Fill global_offset_table if it hasn't already been done. Allocate pic_label_name dynamically. * ggc.h (empty_string): New variable. * ggc-simple.c (empty_string): Likewise. (init_ggc): Allocate empty_string and add as root. * stmt.c (digit_strings): New variable. (init_stmt): Add last_block_end_note as root. Allocate and initialize digit_strings. (expand_asm_operands): Use empty_string and digit_string instead of string constants. * profile.c (init_arc_profiler): Allocate with ggc_alloc_string instead of xmalloc. (output_func_start_profiler): Likewise. * c-typeck.c (digest_init): Check if init is error_mark_node. From-SVN: r29575
Diffstat (limited to 'gcc/profile.c')
-rw-r--r--gcc/profile.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/profile.c b/gcc/profile.c
index 871f557..9e7cece 100644
--- a/gcc/profile.c
+++ b/gcc/profile.c
@@ -1540,7 +1540,7 @@ static void
init_arc_profiler ()
{
/* Generate and save a copy of this so it can be shared. */
- char *name = xmalloc (20);
+ char *name = ggc_alloc_string (NULL, 20);
ASM_GENERATE_INTERNAL_LABEL (name, "LPBX", 2);
profiler_label = gen_rtx_SYMBOL_REF (Pmode, name);
ggc_add_rtx_root (&profiler_label, 1);
@@ -1678,10 +1678,11 @@ output_func_start_profiler ()
expand_function_start (fndecl, 0);
/* Actually generate the code to call __bb_init_func. */
- name = xmalloc (20);
+ name = ggc_alloc_string (NULL, 20);
ASM_GENERATE_INTERNAL_LABEL (name, "LPBX", 0);
table_address = force_reg (Pmode, gen_rtx_SYMBOL_REF (Pmode, name));
- emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__bb_init_func"), 0,
+ emit_library_call (gen_rtx_SYMBOL_REF
+ (Pmode, ggc_alloc_string ("__bb_init_func", 14)), 0,
mode, 1, table_address, Pmode);
expand_function_end (input_filename, lineno, 0);