diff options
author | uweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-03-10 15:12:10 +0000 |
---|---|---|
committer | uweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-03-10 15:12:10 +0000 |
commit | 8881674294ea36ba132ff6b800186b90333a7772 (patch) | |
tree | 3cf536be37878e40f9fa8a49def5a1b619f506eb /gcc/dbxout.c | |
parent | 5afaec29eb16b28957e90b356c7889f96ee8fcd5 (diff) | |
download | gcc-8881674294ea36ba132ff6b800186b90333a7772.tar.gz |
* dbxout.c (dbxout_symbol_location): Do not output references
to optimized-out constant pool symbols.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@79258 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dbxout.c')
-rw-r--r-- | gcc/dbxout.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c index 482470abb8b..2e7c1eb1777 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -2503,11 +2503,27 @@ dbxout_symbol_location (tree decl, tree type, const char *suffix, rtx home) if (GET_CODE (current_sym_addr) == SYMBOL_REF && CONSTANT_POOL_ADDRESS_P (current_sym_addr)) { - rtx tmp = get_pool_constant (current_sym_addr); + bool marked; + rtx tmp = get_pool_constant_mark (current_sym_addr, &marked); - if (GET_CODE (tmp) == SYMBOL_REF - || GET_CODE (tmp) == LABEL_REF) - current_sym_addr = tmp; + if (GET_CODE (tmp) == SYMBOL_REF) + { + current_sym_addr = tmp; + if (CONSTANT_POOL_ADDRESS_P (current_sym_addr)) + get_pool_constant_mark (current_sym_addr, &marked); + else + marked = true; + } + else if (GET_CODE (tmp) == LABEL_REF) + { + current_sym_addr = tmp; + marked = true; + } + + /* If all references to the constant pool were optimized + out, we just ignore the symbol. */ + if (!marked) + return 0; } /* Ultrix `as' seems to need this. */ |