From: Richard Kenner Date: Mon, 4 Oct 1993 01:48:54 +0000 (-0400) Subject: (assign_parms): Pass objects who size depends on the contents of the X-Git-Tag: misc/cutover-egcs-0~8358 X-Git-Url: https://gcc.gnu.org/git/?a=commitdiff_plain;h=a14ae50814020a46d9e281a8cc493843c0a04cf3;p=gcc.git (assign_parms): Pass objects who size depends on the contents of the object by invisible reference. From-SVN: r5585 --- diff --git a/gcc/function.c b/gcc/function.c index 3956969eadce..824855dc44b2 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;