aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2004-07-16 13:34:12 -0700
committerRichard Henderson <rth@gcc.gnu.org>2004-07-16 13:34:12 -0700
commitd58247a32166e5bb072261dc258a237a8d26a39b (patch)
treee6d0fcfb2e19b283cad9eb0657730e2d85bb5b13 /gcc
parent7eacb691bbe051ae1d62800d9e5dad753df7acff (diff)
downloadgcc-d58247a32166e5bb072261dc258a237a8d26a39b.zip
gcc-d58247a32166e5bb072261dc258a237a8d26a39b.tar.gz
gcc-d58247a32166e5bb072261dc258a237a8d26a39b.tar.bz2
* function.c (pass_by_reference): True for all variable sized types.
From-SVN: r84829
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/function.c5
2 files changed, 6 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e34f5f0..c579dd5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/function.c b/gcc/function.c
index cddade0..23fb74c 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -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;
}