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.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree-stdarg.c b/gcc/tree-stdarg.c
index 4e030b12fa9..9e7369fc3c1 100644
--- a/gcc/tree-stdarg.c
+++ b/gcc/tree-stdarg.c
@@ -496,6 +496,9 @@ check_all_va_list_escapes (struct stdarg_info *si)
tree use;
ssa_op_iter iter;
+ if (is_gimple_debug (stmt))
+ continue;
+
FOR_EACH_SSA_TREE_OPERAND (use, stmt, iter, SSA_OP_ALL_USES)
{
if (! bitmap_bit_p (si->va_list_escape_vars,
@@ -837,6 +840,8 @@ execute_optimize_stdarg (void)
continue;
}
}
+ else if (is_gimple_debug (stmt))
+ continue;
/* All other uses of va_list are either va_copy (that is not handled
in this optimization), taking address of va_list variable or