diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-02-08 15:26:55 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-02-08 15:26:55 +0000 |
commit | 2fffb07a72d0755a559b08cfa30eb12d277daec1 (patch) | |
tree | 20d56621348a3b110462868858912c7fa9c996f0 /gcc/tree-stdarg.c | |
parent | 00d899d593b3ee0b57d64166bcbdb2c34bc40f0d (diff) | |
download | gcc-2fffb07a72d0755a559b08cfa30eb12d277daec1.tar.gz |
2013-02-08 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 195888 using svnmerge.py
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@195892 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-stdarg.c')
-rw-r--r-- | gcc/tree-stdarg.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/tree-stdarg.c b/gcc/tree-stdarg.c index cd573a339cf..8ad9fc2d22e 100644 --- a/gcc/tree-stdarg.c +++ b/gcc/tree-stdarg.c @@ -526,6 +526,37 @@ check_all_va_list_escapes (struct stdarg_info *si) { gimple_stmt_iterator i; + for (i = gsi_start_phis (bb); !gsi_end_p (i); gsi_next (&i)) + { + tree lhs; + use_operand_p uop; + ssa_op_iter soi; + gimple phi = gsi_stmt (i); + + lhs = PHI_RESULT (phi); + if (virtual_operand_p (lhs) + || bitmap_bit_p (si->va_list_escape_vars, + SSA_NAME_VERSION (lhs))) + continue; + + FOR_EACH_PHI_ARG (uop, phi, soi, SSA_OP_USE) + { + tree rhs = USE_FROM_PTR (uop); + if (TREE_CODE (rhs) == SSA_NAME + && bitmap_bit_p (si->va_list_escape_vars, + SSA_NAME_VERSION (rhs))) + { + if (dump_file && (dump_flags & TDF_DETAILS)) + { + fputs ("va_list escapes in ", dump_file); + print_gimple_stmt (dump_file, phi, 0, dump_flags); + fputc ('\n', dump_file); + } + return true; + } + } + } + for (i = gsi_start_bb (bb); !gsi_end_p (i); gsi_next (&i)) { gimple stmt = gsi_stmt (i); |