http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51692

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-30 
22:57:15 UTC ---
I think the problem is that for BUILT_IN_FREE we don't mark_operand_necessary,
but then the BUILT_IN_CALLOC call is marked as necessary anyway through
mark_aliased_reaching_defs_necessary_1 calling mark_operand_necessary (vdef).
The *p += 2.0; stmts are removed and for the calloc eliminate_unnecessary_stmts
performs:
                  /* When LHS of var = call (); is dead, simplify it into
                     call (); saving one operand.  */
and thus drops the lhs SSA_NAME, eventhough it is still used by the free call.
Richard?

Reply via email to