From 657bb6dc84c557465d1d6683ba0731017f6137b8 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 20 Apr 1995 22:26:30 +0000 Subject: 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 --- gcc/calls.c | 6 +++++- gcc/function.c | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'gcc') 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) -- cgit v1.1