This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/33199] [4.3 Regression] tr1/2_general_utilities/shared_ptr/assign/auto_ptr.cc
- From: "hjl at lucon dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Aug 2007 01:27:53 -0000
- Subject: [Bug middle-end/33199] [4.3 Regression] tr1/2_general_utilities/shared_ptr/assign/auto_ptr.cc
- References: <bug-33199-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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