aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <merrill@gnu.org>1995-04-20 22:26:30 +0000
committerJason Merrill <merrill@gnu.org>1995-04-20 22:26:30 +0000
commit657bb6dc84c557465d1d6683ba0731017f6137b8 (patch)
tree2bc0dae2f3e3cca9188a8d15dbda1bb8205f033a
parenta01408abbe4b7e5a70e423efd8228fb78e9fae11 (diff)
downloadgcc-657bb6dc84c557465d1d6683ba0731017f6137b8.zip
gcc-657bb6dc84c557465d1d6683ba0731017f6137b8.tar.gz
gcc-657bb6dc84c557465d1d6683ba0731017f6137b8.tar.bz2
Use TREE_ADDRESSABLE rather than | TYPE_NEEDS_CONSTRUCTING to decide whether a...
Use TREE_ADDRESSABLE rather than | TYPE_NEEDS_CONSTRUCTING to decide whether a parameter needs to be | passed by invisible reference. From-SVN: r9420
-rw-r--r--gcc/calls.c6
-rw-r--r--gcc/function.c2
2 files changed, 6 insertions, 2 deletions
diff --git a/gcc/calls.c b/gcc/calls.c
index a8b6d3e..63125a3 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -1022,7 +1022,7 @@ expand_call (exp, target, ignore)
/* See if this argument should be passed by invisible reference. */
if ((TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST
&& contains_placeholder_p (TYPE_SIZE (type)))
- || TYPE_NEEDS_CONSTRUCTING (type)
+ || TREE_ADDRESSABLE (type)
#ifdef FUNCTION_ARG_PASS_BY_REFERENCE
|| FUNCTION_ARG_PASS_BY_REFERENCE (args_so_far, TYPE_MODE (type),
type, argpos < n_named_args)
@@ -1325,6 +1325,10 @@ expand_call (exp, target, ignore)
|| (must_preallocate && (args_size.var != 0 || args_size.constant != 0)
&& calls_function (args[i].tree_value, 0)))
{
+ /* If this is an addressable type, we cannot pre-evaluate it. */
+ if (TREE_ADDRESSABLE (TREE_TYPE (args[i].tree_value)))
+ abort ();
+
push_temp_slots ();
args[i].initial_value = args[i].value
diff --git a/gcc/function.c b/gcc/function.c
index 654a3af..48bcc9f 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -3271,7 +3271,7 @@ assign_parms (fndecl, second_time)
if ((TREE_CODE (TYPE_SIZE (passed_type)) != INTEGER_CST
&& contains_placeholder_p (TYPE_SIZE (passed_type)))
- || TYPE_NEEDS_CONSTRUCTING (passed_type)
+ || TREE_ADDRESSABLE (passed_type)
#ifdef FUNCTION_ARG_PASS_BY_REFERENCE
|| FUNCTION_ARG_PASS_BY_REFERENCE (args_so_far, passed_mode,
passed_type, ! last_named)