diff options
author | Geoffrey Keating <geoffk@apple.com> | 2003-04-29 23:32:44 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 2003-04-29 23:32:44 +0000 |
commit | b3d627e251760957416f6508d69c7a0572ac9b8c (patch) | |
tree | 998d8bdfe8240b5ebae5010c1f1a3132943928c6 /gcc/tree-inline.c | |
parent | 0384674ecf6f70a9aab02476619e02972ea6a661 (diff) | |
download | gcc-b3d627e251760957416f6508d69c7a0572ac9b8c.zip gcc-b3d627e251760957416f6508d69c7a0572ac9b8c.tar.gz gcc-b3d627e251760957416f6508d69c7a0572ac9b8c.tar.bz2 |
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
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 3a8adc5..d1acba3 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -1008,6 +1008,13 @@ inlinable_function_p (fn, id, nolimit) else if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)) == NULL && 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 has refused to inline functions using alloca, or functions whose values are returned in a PARALLEL, and a few other such obscure |