aboutsummaryrefslogtreecommitdiff
path: root/gcc/stmt.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2000-11-11 19:11:47 -0500
committerJason Merrill <jason@gcc.gnu.org>2000-11-11 19:11:47 -0500
commitd96a6d1a1c6c53816eef51a447c3e4899dd24df6 (patch)
tree49d6a4beae0ee6bca60387ac0194f98bde8ee221 /gcc/stmt.c
parent5696467825b85328f6b808fdc20c50c1ce97a60d (diff)
downloadgcc-d96a6d1a1c6c53816eef51a447c3e4899dd24df6.zip
gcc-d96a6d1a1c6c53816eef51a447c3e4899dd24df6.tar.gz
gcc-d96a6d1a1c6c53816eef51a447c3e4899dd24df6.tar.bz2
function.c (assign_parms): If TREE_ADDRESSABLE is set...
* function.c (assign_parms): If TREE_ADDRESSABLE is set, try to give the parm a register and then call put_var_into_stack. * stmt.c (expand_decl): Likewise. cp/ * typeck.c (mark_addressable): Don't call put_var_into_stack. From-SVN: r37396
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r--gcc/stmt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index cf0124b..4e42e69 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -3837,7 +3837,6 @@ expand_decl (decl)
&& !(flag_float_store
&& TREE_CODE (type) == REAL_TYPE)
&& ! TREE_THIS_VOLATILE (decl)
- && ! TREE_ADDRESSABLE (decl)
&& (DECL_REGISTER (decl) || optimize)
/* if -fcheck-memory-usage, check all variables. */
&& ! current_function_check_memory_usage)
@@ -3855,6 +3854,10 @@ expand_decl (decl)
TYPE_ALIGN (TREE_TYPE (TREE_TYPE (decl))));
maybe_set_unchanging (DECL_RTL (decl), decl);
+
+ /* If something wants our address, try to use ADDRESSOF. */
+ if (TREE_ADDRESSABLE (decl))
+ put_var_into_stack (decl);
}
else if (TREE_CODE (DECL_SIZE_UNIT (decl)) == INTEGER_CST