diff options
author | Jan Hubicka <jh@suse.cz> | 2001-08-17 15:50:15 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2001-08-17 13:50:15 +0000 |
commit | abde42f7c757b26e71298e8cae90b0692bdd9fd7 (patch) | |
tree | c1f73b83f17d5ed379df9f03a91168c269c58e9b /gcc/stmt.c | |
parent | 3446405d5e9afd01c9afd6d6cc43803aa8c5890c (diff) | |
download | gcc-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/stmt.c')
-rw-r--r-- | gcc/stmt.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -3810,15 +3810,17 @@ expand_decl (decl) else if (DECL_SIZE (decl) == 0) /* Variable with incomplete type. */ { + rtx x; if (DECL_INITIAL (decl) == 0) /* Error message was already done; now avoid a crash. */ - SET_DECL_RTL (decl, gen_rtx_MEM (BLKmode, const0_rtx)); + x = gen_rtx_MEM (BLKmode, const0_rtx); else /* An initializer is going to decide the size of this array. Until we know the size, represent its address with a reg. */ - SET_DECL_RTL (decl, gen_rtx_MEM (BLKmode, gen_reg_rtx (Pmode))); + x = gen_rtx_MEM (BLKmode, gen_reg_rtx (Pmode)); - set_mem_attributes (DECL_RTL (decl), decl, 1); + set_mem_attributes (x, decl, 1); + SET_DECL_RTL (decl, x); } else if (DECL_MODE (decl) != BLKmode /* If -ffloat-store, don't put explicit float vars @@ -3888,7 +3890,7 @@ expand_decl (decl) else /* Dynamic-size object: must push space on the stack. */ { - rtx address, size; + rtx address, size, x; /* Record the stack pointer on entry to block, if have not already done so. */ @@ -3913,9 +3915,10 @@ expand_decl (decl) TYPE_ALIGN (TREE_TYPE (decl))); /* Reference the variable indirect through that rtx. */ - SET_DECL_RTL (decl, gen_rtx_MEM (DECL_MODE (decl), address)); + x = gen_rtx_MEM (DECL_MODE (decl), address); + set_mem_attributes (x, decl, 1); + SET_DECL_RTL (decl, x); - set_mem_attributes (DECL_RTL (decl), decl, 1); /* Indicate the alignment we actually gave this variable. */ #ifdef STACK_BOUNDARY |