diff options
author | Tom de Vries <tom@codesourcery.com> | 2015-04-17 09:27:08 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2015-04-17 09:27:08 +0000 |
commit | d67cb100c6b0597e0377481ecd0f76e8e555770f (patch) | |
tree | da8ccc329015608df03029dffb874f96544fad71 /gcc/tree-inline.c | |
parent | f8e89441bc5518f450b6511c59c17c837859d109 (diff) | |
download | gcc-d67cb100c6b0597e0377481ecd0f76e8e555770f.zip gcc-d67cb100c6b0597e0377481ecd0f76e8e555770f.tar.gz gcc-d67cb100c6b0597e0377481ecd0f76e8e555770f.tar.bz2 |
Set PROP_gimple_lva for functions without IFN_VA_ARG
2015-04-17 Tom de Vries <tom@codesourcery.com>
* gimplify.c (gimplify_function_tree): Tentatively set PROP_gimple_lva
in cfun->curr_properties.
(gimplify_va_arg_expr): Clear PROP_gimple_lva in cfun->curr_properties
if we generate an IFN_VA_ARG.
* tree-inline.c (expand_call_inline): Reset PROP_gimple_lva in dest
function if PROP_gimple_lva is not set in src function.
From-SVN: r222174
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 83e4335..42ddb9f 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -4526,6 +4526,14 @@ expand_call_inline (basic_block bb, gimple stmt, copy_body_data *id) id->src_cfun = DECL_STRUCT_FUNCTION (fn); id->call_stmt = stmt; + /* If the the src function contains an IFN_VA_ARG, then so will the dst + function after inlining. */ + if ((id->src_cfun->curr_properties & PROP_gimple_lva) == 0) + { + struct function *dst_cfun = DECL_STRUCT_FUNCTION (id->dst_fn); + dst_cfun->curr_properties &= ~PROP_gimple_lva; + } + gcc_assert (!id->src_cfun->after_inlining); id->entry_bb = bb; |