summaryrefslogtreecommitdiff
path: root/gcc/stmt.c
diff options
context:
space:
mode:
authorsamuel <samuel@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-22 05:51:44 +0000
committersamuel <samuel@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-22 05:51:44 +0000
commit0f4dbfb982e350a2585bd8416ad8740661abebb2 (patch)
treed77f393f094055cf54780770525095be9da9ac8a /gcc/stmt.c
parent711575e5dabfc53f14d875185e1111e9073f0199 (diff)
downloadgcc-0f4dbfb982e350a2585bd8416ad8740661abebb2.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29575 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r--gcc/stmt.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 6483da5bcc5..f2180bf4944 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -401,6 +401,9 @@ struct stmt_status
/* Non-zero if we are using EH to handle cleanus. */
static int using_eh_for_cleanups_p = 0;
+/* Character strings, each containing a single decimal digit. */
+static char *digit_strings[10];
+
static int n_occurrences PROTO((int, const char *));
static void expand_goto_internal PROTO((tree, rtx, rtx));
@@ -592,7 +595,17 @@ mark_stmt_status (p)
void
init_stmt ()
{
+ int i;
+
gcc_obstack_init (&stmt_obstack);
+ ggc_add_rtx_root (&last_block_end_note, 1);
+
+ for (i = 0; i < 10; i++)
+ {
+ digit_strings[i] = ggc_alloc_string (NULL, 1);
+ digit_strings[i][0] = '0' + i;
+ }
+ ggc_add_string_root (digit_strings, 10);
}
void
@@ -1547,9 +1560,9 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
argvec = rtvec_alloc (ninputs);
constraints = rtvec_alloc (ninputs);
- body = gen_rtx_ASM_OPERANDS (VOIDmode,
- TREE_STRING_POINTER (string), "", 0, argvec,
- constraints, filename, line);
+ body = gen_rtx_ASM_OPERANDS (VOIDmode, TREE_STRING_POINTER (string),
+ empty_string, 0, argvec, constraints,
+ filename, line);
MEM_VOLATILE_P (body) = vol;
@@ -1717,14 +1730,12 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
/* For in-out operands, copy output rtx to input rtx. */
for (i = 0; i < ninout; i++)
{
- static char match[9+1][2]
- = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"};
int j = inout_opnum[i];
XVECEXP (body, 3, ninputs - ninout + i) /* argvec */
= output_rtx[j];
XVECEXP (body, 4, ninputs - ninout + i) /* constraints */
- = gen_rtx_ASM_INPUT (inout_mode[i], match[j]);
+ = gen_rtx_ASM_INPUT (inout_mode[i], digit_strings[j]);
}
/* Now, for each output, construct an rtx