Commit b3d627e2 by Geoffrey Keating Committed by Geoffrey Keating

tree-inline.c (inlinable_function_p): Don't support inlining functions using varargs.

	* tree-inline.c (inlinable_function_p): Don't support inlining
	functions using varargs.

Index: testsuite/ChangeLog
	* gcc.c-torture/compile/inline-1.c: New file.

From-SVN: r66269
parent 0384674e
...@@ -23,6 +23,9 @@ ...@@ -23,6 +23,9 @@
2003-04-29 Geoffrey Keating <geoffk@apple.com> 2003-04-29 Geoffrey Keating <geoffk@apple.com>
* tree-inline.c (inlinable_function_p): Don't support inlining
functions using varargs.
* doc/invoke.texi (Overall Options): Mention -x objective-c-header. * doc/invoke.texi (Overall Options): Mention -x objective-c-header.
* dwarf2out.c (output_call_frame_info): No need to output EH * dwarf2out.c (output_call_frame_info): No need to output EH
......
2003-04-29 Geoffrey Keating <geoffk@apple.com>
* gcc.c-torture/compile/inline-1.c: New file.
2003-04-29 Mark Mitchell <mark@codesourcery.com> 2003-04-29 Mark Mitchell <mark@codesourcery.com>
PR c++/10551 PR c++/10551
......
typedef __builtin_va_list va_list;
extern void foo (va_list);
static void
build_message_string (const char *msg, ...)
{
va_list ap;
__builtin_va_start (ap, msg);
foo (ap);
__builtin_va_end (ap);
}
void
file_name_as_prefix (f)
const char *f;
{
build_message_string ("%s: ", f);
}
...@@ -1008,6 +1008,13 @@ inlinable_function_p (fn, id, nolimit) ...@@ -1008,6 +1008,13 @@ inlinable_function_p (fn, id, nolimit)
else if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)) == NULL else if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)) == NULL
&& find_alloca_call (DECL_SAVED_TREE (fn))) && find_alloca_call (DECL_SAVED_TREE (fn)))
; ;
/* Can't inline functions which use varargs. It's not theoretically
impossible, we just don't do it yet; at least one problem is that
expand_builtin_next_arg needs to handle the situation. */
else if (TYPE_ARG_TYPES (TREE_TYPE (fn)) != 0
&& (TREE_VALUE (tree_last (TYPE_ARG_TYPES (TREE_TYPE (fn))))
!= void_type_node))
;
/* All is well. We can inline this function. Traditionally, GCC /* All is well. We can inline this function. Traditionally, GCC
has refused to inline functions using alloca, or functions whose has refused to inline functions using alloca, or functions whose
values are returned in a PARALLEL, and a few other such obscure values are returned in a PARALLEL, and a few other such obscure
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment