From: Richard Henderson Date: Fri, 16 Jul 2004 20:34:12 +0000 (-0700) Subject: * function.c (pass_by_reference): True for all variable sized types. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d58247a32166e5bb072261dc258a237a8d26a39b;p=gcc.git * function.c (pass_by_reference): True for all variable sized types. From-SVN: r84829 --- 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; }