On Thu, 28 Nov 2013, Jakub Jelinek wrote: > On Thu, Nov 28, 2013 at 11:14:45AM -0800, H.J. Lu wrote: > > On Thu, Nov 28, 2013 at 6:49 AM, Richard Biener <rguent...@suse.de> wrote: > > > > > > Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. > > > > > > Richard. > > > > > > 2013-11-28 Richard Biener <rguent...@suse.de> > > > > > > PR tree-optimization/59330 > > > * tree-ssa-dce.c (eliminate_unnecessary_stmts): Simplify > > > and fix delayed marking of free calls not necessary. > > > > > > * gcc.dg/torture/pr59330.c: New testcase. > > > > > > > This caused: > > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59334 > > It even breaks bootstrap on i686-linux --enable-checking=yes,rtl , > because insn-recog.c compilation during stage3 eats more memory than can fit > into 32-bit address space.
Hmm, seems I tested the wrong tree. Looking at one of the testsuite fails a fix is obvious. Bootstrap & regtest running on x86_64-unknown-linux-gnu. Richard. 2013-11-29 Richard Biener <rguent...@suse.de> PR tree-optimization/59334 * tree-ssa-dce.c (eliminate_unnecessary_stmts): Fix bug in previous commit. Index: gcc/tree-ssa-dce.c =================================================================== --- gcc/tree-ssa-dce.c (revision 205511) +++ gcc/tree-ssa-dce.c (working copy) @@ -1200,7 +1200,8 @@ eliminate_unnecessary_stmts (void) if (TREE_CODE (ptr) == SSA_NAME) { gimple def_stmt = SSA_NAME_DEF_STMT (ptr); - if (!gimple_plf (def_stmt, STMT_NECESSARY)) + if (!gimple_nop_p (def_stmt) + && !gimple_plf (def_stmt, STMT_NECESSARY)) gimple_set_plf (stmt, STMT_NECESSARY, false); } }