summaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-16 20:34:12 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-16 20:34:12 +0000
commit39cd001ae972d3fbc903ca568432f0b46cda67da (patch)
treee6d0fcfb2e19b283cad9eb0657730e2d85bb5b13 /gcc/function.c
parent78ccfdeecdbd4273714c214cf0f2b4bb25c82f57 (diff)
downloadgcc-39cd001ae972d3fbc903ca568432f0b46cda67da.tar.gz
* function.c (pass_by_reference): True for all variable sized types.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84829 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/function.c b/gcc/function.c
index cddade0a751..23fb74cf676 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;
}