X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Ftree-stdarg.c;h=9b7a126b1ef4bc8e2b2319d1b98d4777eb571f87;hb=176ff0f9a1016553978d6cf41770703e2ad90958;hp=46fc339a55a62f9aae228fd5df68621ba07b0870;hpb=de508de3aa579410056530a92de76d4df94a62d6;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/tree-stdarg.c b/gcc/tree-stdarg.c index 46fc339a55a..9b7a126b1ef 100644 --- a/gcc/tree-stdarg.c +++ b/gcc/tree-stdarg.c @@ -1,5 +1,5 @@ /* Pass computing data for optimizing stdarg functions. - Copyright (C) 2004, 2005, 2007, 2008, 2009, 2010 + Copyright (C) 2004, 2005, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Contributed by Jakub Jelinek @@ -847,8 +847,12 @@ execute_optimize_stdarg (void) if (get_gimple_rhs_class (gimple_assign_rhs_code (stmt)) == GIMPLE_SINGLE_RHS) { + /* Check for ap ={v} {}. */ + if (TREE_CLOBBER_P (rhs)) + continue; + /* Check for tem = ap. */ - if (va_list_ptr_read (&si, rhs, lhs)) + else if (va_list_ptr_read (&si, rhs, lhs)) continue; /* Check for the last insn in: @@ -872,8 +876,12 @@ execute_optimize_stdarg (void) if (get_gimple_rhs_class (gimple_assign_rhs_code (stmt)) == GIMPLE_SINGLE_RHS) { + /* Check for ap ={v} {}. */ + if (TREE_CLOBBER_P (rhs)) + continue; + /* Check for ap[0].field = temp. */ - if (va_list_counter_struct_op (&si, lhs, rhs, true)) + else if (va_list_counter_struct_op (&si, lhs, rhs, true)) continue; /* Check for temp = ap[0].field. */ @@ -963,6 +971,6 @@ struct gimple_opt_pass pass_stdarg = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_dump_func /* todo_flags_finish */ + 0 /* todo_flags_finish */ } };