diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-17 13:50:15 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-17 13:50:15 +0000 |
commit | d05cd6113fdb95958f8128665f5a5f55fe4ae491 (patch) | |
tree | c1f73b83f17d5ed379df9f03a91168c269c58e9b /gcc/stmt.c | |
parent | e6c995451fa778c6d6afeae0ad8b735d4ccafb6e (diff) | |
download | gcc-d05cd6113fdb95958f8128665f5a5f55fe4ae491.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44961 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r-- | gcc/stmt.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c index 593fe4de4da..357583d004f 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -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 |