[PATCH] Fix tree-stdarg after "Mark objects death@end of scope" changes
Jakub Jelinek
jakub@redhat.com
Fri Nov 11 18:35:00 GMT 2011
Hi!
This fixes stdarg-2.c failures on i?86-linux, bootstrapped/regtested
on i686-linux, will commit as obvious tonight.
2011-11-11 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/51091
* tree-stdarg.c (execute_optimize_stdarg): Ignore TREE_CLOBBER_P
rhs also in the va_list_simple_ptr case.
--- gcc/tree-stdarg.c.jj 2011-11-08 23:35:12.000000000 +0100
+++ gcc/tree-stdarg.c 2011-11-11 15:02:59.005511553 +0100
@@ -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:
@@ -875,6 +879,7 @@ execute_optimize_stdarg (void)
/* Check for ap ={v} {}. */
if (TREE_CLOBBER_P (rhs))
continue;
+
/* Check for ap[0].field = temp. */
else if (va_list_counter_struct_op (&si, lhs, rhs, true))
continue;
Jakub
More information about the Gcc-patches
mailing list