varasm.c (struct deferred_string): New structure.
authorJakub Jelinek <jakub@redhat.com>
Tue, 14 Nov 2000 17:37:19 +0000 (18:37 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 14 Nov 2000 17:37:19 +0000 (18:37 +0100)
commitbd7cf17efd38b94f26bcf0c309c6b9053c0a21dd
treeb5c71843b63df50a1d55b0f1bf1e75e0c89fa1d2
parent10e927efe90d9c6bef3ec33a1faeb98cfdde88ee
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
gcc/ChangeLog
gcc/expr.c
gcc/rtl.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/20000801-4.c
gcc/varasm.c