[Bug tree-optimization/51692] [4.7 Regression] ICE on several valgrind tests

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Dec 30 23:05:00 GMT 2011


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?



More information about the Gcc-bugs mailing list