aboutsummaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@redhat.com>2003-11-04 09:14:18 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2003-11-04 09:14:18 +0000
commit21e9fc4735eca1010ac051b76cd361943f3e6d4a (patch)
tree794f7f482bbd70e6e9a2a4361659acc02fe2a1e8 /gcc/varasm.c
parent7807fcd903c2a016ee64a6ac6ce66443e801791f (diff)
downloadgcc-21e9fc4735eca1010ac051b76cd361943f3e6d4a.zip
gcc-21e9fc4735eca1010ac051b76cd361943f3e6d4a.tar.gz
gcc-21e9fc4735eca1010ac051b76cd361943f3e6d4a.tar.bz2
emit-rtl.c (copy_rtx_if_shared): Don't allow MEMs with constant addresses to be shared.
* emit-rtl.c (copy_rtx_if_shared): Don't allow MEMs with constant addresses to be shared. (force_const_mem): Return a copy of the pool entry. From-SVN: r73248
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 791b8ad..21b76b9 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -2915,7 +2915,7 @@ force_const_mem (enum machine_mode mode, rtx x)
hash = const_hash_rtx (mode, x);
for (desc = const_rtx_hash_table[hash]; desc; desc = desc->next)
if (compare_constant_rtx (mode, x, desc))
- return desc->rtl;
+ return copy_rtx (desc->rtl);
/* No constant equal to X is known to have been output.
Make a constant descriptor to enter X in the hash table
@@ -2983,7 +2983,7 @@ force_const_mem (enum machine_mode mode, rtx x)
SYMBOL_REF_FLAGS (symbol) = SYMBOL_FLAG_LOCAL;
current_function_uses_const_pool = 1;
- return def;
+ return copy_rtx (def);
}
/* Given a SYMBOL_REF with CONSTANT_POOL_ADDRESS_P true, return a pointer to