aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2000-11-14 18:37:19 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2000-11-14 18:37:19 +0100
commitbd7cf17efd38b94f26bcf0c309c6b9053c0a21dd (patch)
treeb5c71843b63df50a1d55b0f1bf1e75e0c89fa1d2 /gcc/expr.c
parent10e927efe90d9c6bef3ec33a1faeb98cfdde88ee (diff)
downloadgcc-bd7cf17efd38b94f26bcf0c309c6b9053c0a21dd.zip
gcc-bd7cf17efd38b94f26bcf0c309c6b9053c0a21dd.tar.gz
gcc-bd7cf17efd38b94f26bcf0c309c6b9053c0a21dd.tar.bz2
varasm.c (struct deferred_string): New structure.
* varasm.c (struct deferred_string): New structure. (const_str_htab): New variable. (STRHASH): New macro. (mark_const_str_htab_1, mark_const_str_htab, const_str_htab_hash, constr_str_htab_eq, const_str_htab_del): New functions. (output_constant_def): Add DEFER argument, defer string constants until mark_constant_pool time if requested. (mark_constant_pool): Walk the insn chain even if const_str_htab is not empty. (mark_constants): If a SYMBOL_REF for deferred string is found, output it and remove from hash table. (output_addressed_constants): Set DEFER to 0 in call to output_constant_def. * rtl.h (STRING_POOL_ADDRESS_P): Define. (output_constant_def): Adjust prototype. * expr.c (expand_expr): Set DEFER to 1 in call to output_constant_def. * gcc.c-torture/execute/20000801-4.c: Make sure the second string is output. From-SVN: r37459
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index b28db7f..35ccf03 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -6143,7 +6143,7 @@ expand_expr (exp, target, tmode, modifier)
case COMPLEX_CST:
case STRING_CST:
if (! TREE_CST_RTL (exp))
- output_constant_def (exp);
+ output_constant_def (exp, 1);
/* TREE_CST_RTL probably contains a constant address.
On RISC machines where a constant address isn't valid,
@@ -6456,7 +6456,7 @@ expand_expr (exp, target, tmode, modifier)
&& ! mostly_zeros_p (exp))))
|| (modifier == EXPAND_INITIALIZER && TREE_CONSTANT (exp)))
{
- rtx constructor = output_constant_def (exp);
+ rtx constructor = output_constant_def (exp, 1);
if (modifier != EXPAND_CONST_ADDRESS
&& modifier != EXPAND_INITIALIZER