PR 49809 is fallout from my patch to add write data references for the lhs of calls. tree-ssa-phiopt.c was still assuming that writes were always assignments.
I tried to look for other examples of the same thing, but couldn't find any. Tested on x86_64-linux-gnu (all,ada). OK to install? Richard gcc/ PR tree-optimization/49809 * tree-ssa-phiopt.c (cond_if_else_store_replacement): Use gimple_get_lhs instead of gimple_assign_lhs. Index: gcc/tree-ssa-phiopt.c =================================================================== --- gcc/tree-ssa-phiopt.c 2011-07-21 11:10:34.000000000 +0100 +++ gcc/tree-ssa-phiopt.c 2011-07-25 14:32:36.000000000 +0100 @@ -1454,7 +1454,7 @@ cond_if_else_store_replacement (basic_bl continue; then_store = DR_STMT (then_dr); - then_lhs = gimple_assign_lhs (then_store); + then_lhs = gimple_get_lhs (then_store); found = false; FOR_EACH_VEC_ELT (data_reference_p, else_datarefs, j, else_dr) @@ -1463,7 +1463,7 @@ cond_if_else_store_replacement (basic_bl continue; else_store = DR_STMT (else_dr); - else_lhs = gimple_assign_lhs (else_store); + else_lhs = gimple_get_lhs (else_store); if (operand_equal_p (then_lhs, else_lhs, 0)) {