aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2004-02-12 18:25:09 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2004-02-12 13:25:09 -0500
commita5e9c8103348cb036a6f29773fd9e08ec925ffcb (patch)
tree7b4a430fb294344fe468f64ca7e6d902b0ac2a90 /gcc/function.c
parent2e9a1f6b05e79f1b7de15d5ae64f3222d989e7e5 (diff)
downloadgcc-a5e9c8103348cb036a6f29773fd9e08ec925ffcb.zip
gcc-a5e9c8103348cb036a6f29773fd9e08ec925ffcb.tar.gz
gcc-a5e9c8103348cb036a6f29773fd9e08ec925ffcb.tar.bz2
emit-rtl.c (set_mem_attributes_minus_bitpos): Don't kill previous MEM_VOLATILE in REF.
* emit-rtl.c (set_mem_attributes_minus_bitpos): Don't kill previous MEM_VOLATILE in REF. * function.c (fixup_var_refs): Save volatile_ok and set to 1. * expr.c (emit_block_move_via_movstr): Save and restore volatile_ok. From-SVN: r77718
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/function.c b/gcc/function.c
index e2024f2..ca26cf8 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -1503,6 +1503,7 @@ fixup_var_refs (rtx var, enum machine_mode promoted_mode, int unsignedp,
rtx first_insn = get_insns ();
struct sequence_stack *stack = seq_stack;
tree rtl_exps = rtl_expr_chain;
+ int save_volatile_ok = volatile_ok;
/* If there's a hash table, it must record all uses of VAR. */
if (ht)
@@ -1514,6 +1515,9 @@ fixup_var_refs (rtx var, enum machine_mode promoted_mode, int unsignedp,
return;
}
+ /* Volatile is valid in MEMs because all we're doing in changing the
+ address inside. */
+ volatile_ok = 1;
fixup_var_refs_insns (first_insn, var, promoted_mode, unsignedp,
stack == 0, may_share);
@@ -1541,6 +1545,8 @@ fixup_var_refs (rtx var, enum machine_mode promoted_mode, int unsignedp,
end_sequence ();
}
}
+
+ volatile_ok = save_volatile_ok;
}
/* REPLACEMENTS is a pointer to a list of the struct fixup_replacement and X is