1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
$NetBSD: patch-function_c,v 1.1.1.1 2004/06/29 18:01:25 shannonjr Exp $
--- ./gcc/function.c.orig 2004-03-15 16:22:47.000000000 -0700
+++ ./gcc/function.c
@@ -2844,6 +2844,7 @@ gen_mem_addressof (rtx reg, tree decl, i
RTX_UNCHANGING_P (XEXP (r, 0)) = RTX_UNCHANGING_P (reg);
PUT_CODE (reg, MEM);
+ MEM_VOLATILE_P (reg) = 0;
MEM_ATTRS (reg) = 0;
XEXP (reg, 0) = r;
@@ -2876,11 +2877,9 @@ gen_mem_addressof (rtx reg, tree decl, i
{
/* 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);
}
@@ -5256,6 +5255,11 @@ assign_parms (tree fndecl)
{
SET_DECL_RTL (parm, DECL_RTL (fnargs));
DECL_INCOMING_RTL (parm) = DECL_INCOMING_RTL (fnargs);
+ /* Set MEM_EXPR to the original decl, i.e. to PARM,
+ instead of the copy of decl, i.e. FNARGS. */
+ if (DECL_INCOMING_RTL (parm)
+ && GET_CODE (DECL_INCOMING_RTL (parm)) == MEM)
+ set_mem_expr (DECL_INCOMING_RTL (parm), parm);
}
fnargs = TREE_CHAIN (fnargs);
}
|