diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1993-10-03 21:47:12 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1993-10-03 21:47:12 -0400 |
commit | 7ef1fbd7aa2fa6c0ac22cecf9e11b283f8f823f7 (patch) | |
tree | f7492277b2536221bb0a61be551f9b0f41cb99cf /gcc | |
parent | 99098c669ede8d46e430a5f387d18ea3c097fb4f (diff) | |
download | gcc-7ef1fbd7aa2fa6c0ac22cecf9e11b283f8f823f7.zip gcc-7ef1fbd7aa2fa6c0ac22cecf9e11b283f8f823f7.tar.gz gcc-7ef1fbd7aa2fa6c0ac22cecf9e11b283f8f823f7.tar.bz2 |
(expand_call): Pass objects who size depends on the contents of the
object by invisible reference.
From-SVN: r5583
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/calls.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/calls.c b/gcc/calls.c index 3c8f04b..9334d95 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -942,10 +942,14 @@ expand_call (exp, target, ignore) These decisions are driven by the FUNCTION_... macros and must agree with those made by function.c. */ -#ifdef FUNCTION_ARG_PASS_BY_REFERENCE /* See if this argument should be passed by invisible reference. */ - if (FUNCTION_ARG_PASS_BY_REFERENCE (args_so_far, TYPE_MODE (type), type, - argpos < n_named_args)) + if ((TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST + && contains_placeholder_p (TYPE_SIZE (type))) +#ifdef FUNCTION_ARG_PASS_BY_REFERENCE + || FUNCTION_ARG_PASS_BY_REFERENCE (args_so_far, TYPE_MODE (type), + type, argpos < n_named_args) +#endif + ) { #ifdef FUNCTION_ARG_CALLEE_COPIES if (FUNCTION_ARG_CALLEE_COPIES (args_so_far, TYPE_MODE (type), type, @@ -1000,7 +1004,6 @@ expand_call (exp, target, ignore) type = build_pointer_type (type); } } -#endif /* FUNCTION_ARG_PASS_BY_REFERENCE */ mode = TYPE_MODE (type); |