From d58247a32166e5bb072261dc258a237a8d26a39b Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 16 Jul 2004 13:34:12 -0700 Subject: [PATCH] * function.c (pass_by_reference): True for all variable sized types. From-SVN: r84829 --- gcc/ChangeLog | 4 ++++ gcc/function.c | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e34f5f08025..c579dd50f8c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2004-07-16 Richard Henderson + + * function.c (pass_by_reference): True for all variable sized types. + 2004-07-16 Sebastian Pop * Makefile.in (tree-pretty-print.o): Depend on tree-chrec.h. 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; } -- 2.30.2