diff options
author | zlomek <zlomek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-02-24 21:45:20 +0000 |
---|---|---|
committer | zlomek <zlomek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-02-24 21:45:20 +0000 |
commit | e48e460b72d58ee590e36c3e8854d5b79495cdc0 (patch) | |
tree | 7ed30748887e4fadc3caa84aa43799433bee1ae3 /gcc/rtlanal.c | |
parent | 340c4168dbd5730fd201196858519a7ca336362a (diff) | |
download | gcc-e48e460b72d58ee590e36c3e8854d5b79495cdc0.tar.gz |
PR/14240
* rtlanal.c (replace_label): Fix replacing labels in constant pool.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78392 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r-- | gcc/rtlanal.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index f643dfe192a..0ec52dad726 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -2715,7 +2715,6 @@ int replace_label (rtx *x, void *data) { rtx l = *x; - rtx tmp; rtx old_label = ((replace_label_data *) data)->r1; rtx new_label = ((replace_label_data *) data)->r2; bool update_label_nuses = ((replace_label_data *) data)->update_label_nuses; @@ -2723,12 +2722,10 @@ replace_label (rtx *x, void *data) if (l == NULL_RTX) return 0; - if (GET_CODE (l) == MEM - && (tmp = XEXP (l, 0)) != NULL_RTX - && GET_CODE (tmp) == SYMBOL_REF - && CONSTANT_POOL_ADDRESS_P (tmp)) + if (GET_CODE (l) == SYMBOL_REF + && CONSTANT_POOL_ADDRESS_P (l)) { - rtx c = get_pool_constant (tmp); + rtx c = get_pool_constant (l); if (rtx_referenced_p (old_label, c)) { rtx new_c, new_l; @@ -2744,7 +2741,7 @@ replace_label (rtx *x, void *data) /* Add the new constant NEW_C to constant pool and replace the old reference to constant by new reference. */ - new_l = force_const_mem (get_pool_mode (tmp), new_c); + new_l = XEXP (force_const_mem (get_pool_mode (l), new_c), 0); *x = replace_rtx (l, l, new_l); } return 0; |