diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2004-03-10 15:12:10 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@gcc.gnu.org> | 2004-03-10 15:12:10 +0000 |
commit | 452c159ed14cfe15a3bbf76bb988d454be2cb923 (patch) | |
tree | 3cf536be37878e40f9fa8a49def5a1b619f506eb | |
parent | f69535d2b7b0fca2642a0b77ff373215277861fa (diff) | |
download | gcc-452c159ed14cfe15a3bbf76bb988d454be2cb923.zip gcc-452c159ed14cfe15a3bbf76bb988d454be2cb923.tar.gz gcc-452c159ed14cfe15a3bbf76bb988d454be2cb923.tar.bz2 |
dbxout.c (dbxout_symbol_location): Do not output references to optimized-out constant pool symbols.
* dbxout.c (dbxout_symbol_location): Do not output references
to optimized-out constant pool symbols.
From-SVN: r79258
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/dbxout.c | 24 |
2 files changed, 25 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a42379a..48f98f2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-03-10 Ulrich Weigand <uweigand@de.ibm.com> + + * dbxout.c (dbxout_symbol_location): Do not output references + to optimized-out constant pool symbols. + 2004-03-10 Andreas Schwab <schwab@suse.de> * config/ia64/ia64.md (divsi3, udivsi3): Remove unused variable diff --git a/gcc/dbxout.c b/gcc/dbxout.c index 482470a..2e7c1eb 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. */ |