aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1993-10-03 21:48:54 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1993-10-03 21:48:54 -0400
commita14ae50814020a46d9e281a8cc493843c0a04cf3 (patch)
tree22be81373526ee9a4dc8320bed86807192b1f295
parentb50d17a1482fcdbb9823b5028c585b02ef247dea (diff)
downloadgcc-a14ae50814020a46d9e281a8cc493843c0a04cf3.zip
gcc-a14ae50814020a46d9e281a8cc493843c0a04cf3.tar.gz
gcc-a14ae50814020a46d9e281a8cc493843c0a04cf3.tar.bz2
(assign_parms): Pass objects who size depends on the contents of the
object by invisible reference. From-SVN: r5585
-rw-r--r--gcc/function.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 3956969..824855d 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -3015,16 +3015,23 @@ assign_parms (fndecl, second_time)
continue;
}
+ /* See if this arg was passed by invisible reference. It is if
+ it is an object whose size depends on the contents of the
+ object itself or if the machine requires these objects be passed
+ that way. */
+
+ if ((TREE_CODE (TYPE_SIZE (passed_type)) != INTEGER_CST
+ && contains_placeholder_p (TYPE_SIZE (passed_type)))
#ifdef FUNCTION_ARG_PASS_BY_REFERENCE
- /* See if this arg was passed by invisible reference. */
- if (FUNCTION_ARG_PASS_BY_REFERENCE (args_so_far, passed_mode,
- passed_type, ! last_named))
+ || FUNCTION_ARG_PASS_BY_REFERENCE (args_so_far, passed_mode,
+ passed_type, ! last_named)
+#endif
+ )
{
passed_type = build_pointer_type (passed_type);
passed_pointer = 1;
passed_mode = nominal_mode = Pmode;
}
-#endif
promoted_mode = passed_mode;