summaryrefslogtreecommitdiffstats
path: root/gcc/function.c
diff options
context:
space:
mode:
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>2003-12-11 19:04:07 +0000
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>2003-12-11 19:04:07 +0000
commit75e0dc776ece5701357ded35ee2ae7c0cb37a01f (patch)
tree10bc58864ba022fa4eec97364c57606ab6d548a4 /gcc/function.c
parent723bead6da199c0d0263b70e2923bd7fadec3fc3 (diff)
downloadppe42-gcc-75e0dc776ece5701357ded35ee2ae7c0cb37a01f.tar.gz
ppe42-gcc-75e0dc776ece5701357ded35ee2ae7c0cb37a01f.zip
Fix for problem with unnecessary volatile mems.
PR target/13132 * function.c (gen_mem_addressof): When no decl, explicitly clear flag bits. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74543 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 2f6fb9bd143..7ae19d50efa 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -2868,7 +2868,17 @@ gen_mem_addressof (rtx reg, tree decl, int rescan)
fixup_var_refs (reg, GET_MODE (reg), TREE_UNSIGNED (type), reg, 0);
}
else if (rescan)
- fixup_var_refs (reg, GET_MODE (reg), 0, reg, 0);
+ {
+ /* This can only happen during reload. Clear the same flag bits as
+ reload. */
+ MEM_VOLATILE_P (reg) = 0;
+ RTX_UNCHANGING_P (reg) = 0;
+ MEM_IN_STRUCT_P (reg) = 0;
+ MEM_SCALAR_P (reg) = 0;
+ MEM_ATTRS (reg) = 0;
+
+ fixup_var_refs (reg, GET_MODE (reg), 0, reg, 0);
+ }
return reg;
}
OpenPOWER on IntegriCloud