aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
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 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;
}