aboutsummaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2001-08-17 15:50:15 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2001-08-17 13:50:15 +0000
commitabde42f7c757b26e71298e8cae90b0692bdd9fd7 (patch)
treec1f73b83f17d5ed379df9f03a91168c269c58e9b /gcc/varasm.c
parent3446405d5e9afd01c9afd6d6cc43803aa8c5890c (diff)
downloadgcc-abde42f7c757b26e71298e8cae90b0692bdd9fd7.zip
gcc-abde42f7c757b26e71298e8cae90b0692bdd9fd7.tar.gz
gcc-abde42f7c757b26e71298e8cae90b0692bdd9fd7.tar.bz2
Install the proper patch.
* function.c (put_var_into_stack): Temporarily clear DECL_RTL. (assign_params): Avoid setting DECL_RTL to unfinished RTX. (expand_function_start): Likewise. * stmt.c (expand_decl): Likewise. * varasm.c (make_decl_rtx): Likewise. From-SVN: r44961
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 4e39a8a..6cb2fb8 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -681,6 +681,7 @@ make_decl_rtl (decl, asmspec)
const char *name = 0;
const char *new_name = 0;
int reg_number;
+ rtx x;
/* Check that we are not being given an automatic variable. */
/* A weak alias has TREE_PUBLIC set but not the other bits. */
@@ -848,11 +849,11 @@ make_decl_rtl (decl, asmspec)
&& (TREE_PUBLIC (decl) || TREE_STATIC (decl)))))
TREE_SIDE_EFFECTS (decl) = 1;
- SET_DECL_RTL (decl, gen_rtx_MEM (DECL_MODE (decl),
- gen_rtx_SYMBOL_REF (Pmode, name)));
- SYMBOL_REF_WEAK (XEXP (DECL_RTL (decl), 0)) = DECL_WEAK (decl);
+ x = gen_rtx_MEM (DECL_MODE (decl), gen_rtx_SYMBOL_REF (Pmode, name));
+ SYMBOL_REF_WEAK (XEXP (x, 0)) = DECL_WEAK (decl);
if (TREE_CODE (decl) != FUNCTION_DECL)
- set_mem_attributes (DECL_RTL (decl), decl, 1);
+ set_mem_attributes (x, decl, 1);
+ SET_DECL_RTL (decl, x);
/* Optionally set flags or add text to the name to record information
such as that it is a function name.