summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authormerrill <merrill@138bc75d-0d04-0410-961f-82ee72b054a4>1994-07-13 11:06:24 +0000
committermerrill <merrill@138bc75d-0d04-0410-961f-82ee72b054a4>1994-07-13 11:06:24 +0000
commitbe98dac319b020b18438215fb0413893b4339c2f (patch)
tree19118b383753d9b6a0648d09b2be1639de926e11 /gcc
parent0c98255be1c5fbf7eb31626130d7343dc8ea24d2 (diff)
downloadgcc-be98dac319b020b18438215fb0413893b4339c2f.tar.gz
Wed Jul 13 03:30:36 1994 Jason Merrill (jason@deneb.cygnus.com)
* tree.h (TYPE_NEEDS_CONSTRUCTING): New macro. (tree_type): Add needs_constructing_flag. * function.c (assign_parms): If TYPE_NEEDS_CONSTRUCTING, pass by invisible reference. * calls.c (expand_call): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7758 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/calls.c1
-rw-r--r--gcc/function.c1
-rw-r--r--gcc/tree.h7
3 files changed, 8 insertions, 1 deletions
diff --git a/gcc/calls.c b/gcc/calls.c
index d3b21a9d0c0..f0350795bb1 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -996,6 +996,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)
#ifdef FUNCTION_ARG_PASS_BY_REFERENCE
|| FUNCTION_ARG_PASS_BY_REFERENCE (args_so_far, TYPE_MODE (type),
type, argpos < n_named_args)
diff --git a/gcc/function.c b/gcc/function.c
index 16d4a935b83..9f3339613c7 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -3157,6 +3157,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)
#ifdef FUNCTION_ARG_PASS_BY_REFERENCE
|| FUNCTION_ARG_PASS_BY_REFERENCE (args_so_far, passed_mode,
passed_type, ! last_named)
diff --git a/gcc/tree.h b/gcc/tree.h
index 616dedf65eb..dbe5ff9cf5c 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -615,6 +615,10 @@ struct tree_block
If set in a SET_TYPE, indicates a bitstring type. */
#define TYPE_STRING_FLAG(NODE) ((NODE)->type.string_flag)
+/* Indicates that objects of this type must be initialized by calling a
+ function when they are created. */
+#define TYPE_NEEDS_CONSTRUCTING(NODE) ((NODE)->type.needs_constructing_flag)
+
struct tree_type
{
char common[sizeof (struct tree_common)];
@@ -632,6 +636,7 @@ struct tree_type
unsigned string_flag : 1;
unsigned no_force_blk_flag : 1;
+ unsigned needs_constructing_flag : 1;
unsigned lang_flag_0 : 1;
unsigned lang_flag_1 : 1;
unsigned lang_flag_2 : 1;
@@ -639,7 +644,7 @@ struct tree_type
unsigned lang_flag_4 : 1;
unsigned lang_flag_5 : 1;
unsigned lang_flag_6 : 1;
- /* room for 7 more bits */
+ /* room for 6 more bits */
unsigned int align;
union tree_node *pointer_to;