This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/51692] [4.7 Regression] ICE on several valgrind tests
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 30 Dec 2011 22:57:15 +0000
- Subject: [Bug tree-optimization/51692] [4.7 Regression] ICE on several valgrind tests
- Auto-submitted: auto-generated
- References: <bug-51692-4@http.gcc.gnu.org/bugzilla/>
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?