------- Comment #3 from hjl at lucon dot org  2007-08-27 01:27 -------
Revision 127763 removed varargs_function_p call for C++. I tried this patch:

Index: tree-inline.c
===================================================================
--- tree-inline.c       (revision 127763)
+++ tree-inline.c       (working copy)
@@ -1843,6 +1843,18 @@ egress:
   return ret;
 }

+/* Does FUNCTION use a variable-length argument list?  */
+
+static int
+varargs_function_p (tree function)
+{
+  tree parm = TYPE_ARG_TYPES (TREE_TYPE (function));
+  for (; parm; parm = TREE_CHAIN (parm))
+    if (TREE_VALUE (parm) == void_type_node)
+      return 0;
+  return 1;
+}
+
 /* Returns nonzero if FN is a function that does not have any
    fundamental inline blocking properties.  */

@@ -1881,6 +1893,9 @@ inlinable_function_p (tree fn)
           && DECL_REPLACEABLE_P (fn))
     inlinable = false;

+  else if (varargs_function_p (fn))
+    inlinable = false;
+
   else if (!function_attribute_inlinable_p (fn))
     {
       if (do_warning)

and it fixes the regression.


-- 

hjl at lucon dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|target                      |middle-end


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33199

Reply via email to