summaryrefslogtreecommitdiff
path: root/gcc/tree-stdarg.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-stdarg.c')
-rw-r--r--gcc/tree-stdarg.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/tree-stdarg.c b/gcc/tree-stdarg.c
index f205ccbec9a..ea2ef1c4f1b 100644
--- a/gcc/tree-stdarg.c
+++ b/gcc/tree-stdarg.c
@@ -36,6 +36,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-into-ssa.h"
#include "tree-cfg.h"
#include "tree-stdarg.h"
+#include "tree-chkp.h"
/* A simple pass that attempts to optimize stdarg functions on architectures
that need to save register arguments to stack on entry to stdarg functions.
@@ -1047,6 +1048,11 @@ expand_ifn_va_arg_1 (function *fun)
unsigned int nargs = gimple_call_num_args (stmt);
gcc_assert (useless_type_conversion_p (TREE_TYPE (lhs), type));
+ /* We replace call with a new expr. This may require
+ corresponding bndret call fixup. */
+ if (chkp_function_instrumented_p (fun->decl))
+ chkp_fixup_inlined_call (lhs, expr);
+
if (nargs == 3)
{
/* We've transported the size of with WITH_SIZE_EXPR here as