summaryrefslogtreecommitdiffstats
path: root/gcc/stmt.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2000-11-12 00:11:47 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2000-11-12 00:11:47 +0000
commit3f6d7ce005adf895ecad57ebbc52c8b8279ca15f (patch)
tree49d6a4beae0ee6bca60387ac0194f98bde8ee221 /gcc/stmt.c
parenta1e43e06ef6fd9a117abeadd25a8b7d68219b7c9 (diff)
downloadppe42-gcc-3f6d7ce005adf895ecad57ebbc52c8b8279ca15f.tar.gz
ppe42-gcc-3f6d7ce005adf895ecad57ebbc52c8b8279ca15f.zip
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37396 138bc75d-0d04-0410-961f-82ee72b054a4
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 cf0124b7977..4e42e699462 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
OpenPOWER on IntegriCloud