* function.c (pass_by_reference): True for all variable sized types.
authorRichard Henderson <rth@redhat.com>
Fri, 16 Jul 2004 20:34:12 +0000 (13:34 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Fri, 16 Jul 2004 20:34:12 +0000 (13:34 -0700)
From-SVN: r84829

gcc/ChangeLog
gcc/function.c

index e34f5f0802520005c2385d93c9d1e0a9caf32604..c579dd50f8ce805ee5ffc5154a44152b7f58374d 100644 (file)
@@ -1,3 +1,7 @@
+2004-07-16  Richard Henderson  <rth@redhat.com>
+
+       * function.c (pass_by_reference): True for all variable sized types.
+
 2004-07-16  Sebastian Pop  <pop@cri.ensmp.fr>
 
        * Makefile.in (tree-pretty-print.o): Depend on tree-chrec.h.
index cddade0a7511525da0e25fbcd3ebeea83337c1f2..23fb74cf6761380da260542fc266fafa68a45f69 100644 (file)
@@ -2039,9 +2039,8 @@ pass_by_reference (CUMULATIVE_ARGS *ca, enum machine_mode mode,
       if (TREE_ADDRESSABLE (type))
        return true;
 
-      /* If an object's size is dependent on itself, there's no way
-        to *not* pass by reference.  */
-      if (CONTAINS_PLACEHOLDER_P (TYPE_SIZE (type)))
+      /* GCC post 3.4 passes *all* variable sized types by reference.  */
+      if (!TYPE_SIZE (type) || TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
        return true;
     }