]> gcc.gnu.org Git - gcc.git/commitdiff
(assign_parms): Pass objects who size depends on the contents of the
authorRichard Kenner <kenner@gcc.gnu.org>
Mon, 4 Oct 1993 01:48:54 +0000 (21:48 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Mon, 4 Oct 1993 01:48:54 +0000 (21:48 -0400)
object by invisible reference.

From-SVN: r5585

gcc/function.c

index 3956969eadce2dc6ce159410666f76856f90b273..824855dc44b2e07f21533987fc2dc3d55c465c98 100644 (file)
@@ -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;
 
This page took 0.067393 seconds and 5 git commands to generate.