OSDN Git Service

* function.c (pass_by_reference): True for all variable sized types.
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 16 Jul 2004 20:34:12 +0000 (20:34 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 16 Jul 2004 20:34:12 +0000 (20:34 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84829 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/function.c

index e34f5f0..c579dd5 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 cddade0..23fb74c 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;
     }