diff options
author | Alex Samuel <samuel@gcc.gnu.org> | 1999-09-22 05:51:44 +0000 |
---|---|---|
committer | Alex Samuel <samuel@gcc.gnu.org> | 1999-09-22 05:51:44 +0000 |
commit | 21a427cca1eaaf8757782354be2f0917a89fea25 (patch) | |
tree | d77f393f094055cf54780770525095be9da9ac8a /gcc/ggc-simple.c | |
parent | 5ab00e275b539136f48c62b2363936e92d4272c0 (diff) | |
download | gcc-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/ggc-simple.c')
-rw-r--r-- | gcc/ggc-simple.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ggc-simple.c b/gcc/ggc-simple.c index 3eeb8c3..536a06e 100644 --- a/gcc/ggc-simple.c +++ b/gcc/ggc-simple.c @@ -48,6 +48,10 @@ #define GGC_ANY_MAGIC ((unsigned int)0xa9bacbdc) #define GGC_ANY_MAGIC_MARK ((unsigned int)0xa9bacbdc | 1) +/* Constants for general use. */ + +char *empty_string; + /* Global lists of roots, rtxs, and trees. */ struct ggc_rtx @@ -142,6 +146,9 @@ init_ggc PROTO ((void)) dump = fopen ("zgcdump", "w"); setlinebuf (dump); #endif + + ggc_alloc_string ("", 0); + ggc_add_string_root (&empty_string, 1); } /* Start a new GGC context. Memory allocated in previous contexts |