aboutsummaryrefslogtreecommitdiff
path: root/gcc/integrate.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2002-06-23 17:57:53 +0200
committerJeff Law <law@gcc.gnu.org>2002-06-23 09:57:53 -0600
commitf81a79ef6acdf5f2098389cfd7dff11d61672483 (patch)
tree25a03e09f8475979e1fefa9b2ac78afaf5c19863 /gcc/integrate.c
parent3bfb9a0be1071418b1f5fe8ce81ca7ea2b12e3a4 (diff)
downloadgcc-f81a79ef6acdf5f2098389cfd7dff11d61672483.zip
gcc-f81a79ef6acdf5f2098389cfd7dff11d61672483.tar.gz
gcc-f81a79ef6acdf5f2098389cfd7dff11d61672483.tar.bz2
function.h (struct emit_status): Clarify potential contents of regno_reg_rtx array.
* function.h (struct emit_status): Clarify potential contents of regno_reg_rtx array. * integrate.c (copy_rtx_and_substitute): Update comments. Make sure entry in regno_reg_rtx is a REG before checking REG_POINTER. Co-Authored-By: Jeff Law <law@redhat.com> From-SVN: r54924
Diffstat (limited to 'gcc/integrate.c')
-rw-r--r--gcc/integrate.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/integrate.c b/gcc/integrate.c
index 4bbfcea..ead6d31 100644
--- a/gcc/integrate.c
+++ b/gcc/integrate.c
@@ -2062,7 +2062,17 @@ copy_rtx_and_substitute (orig, map, for_lhs)
RTX_UNCHANGING_P (map->reg_map[regno]) = RTX_UNCHANGING_P (temp);
/* A reg with REG_FUNCTION_VALUE_P true will never reach here. */
- if (REG_POINTER (map->x_regno_reg_rtx[regno]))
+ /* Objects may initially be represented as registers, but
+ but turned into a MEM if their address is taken by
+ put_var_into_stack. Therefore, the register table may have
+ entries which are MEMs.
+
+ We briefly tried to clear such entries, but that ended up
+ cascading into many changes due to the optimizers not being
+ prepared for empty entries in the register table. So we've
+ decided to allow the MEMs in the register table for now. */
+ if (REG_P (map->x_regno_reg_rtx[regno])
+ && REG_POINTER (map->x_regno_reg_rtx[regno]))
mark_reg_pointer (map->reg_map[regno],
map->regno_pointer_align[regno]);
regno = REGNO (map->reg_map[regno]);