This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR59330
- From: Richard Biener <rguenther at suse dot de>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 29 Nov 2013 09:46:54 +0100 (CET)
- Subject: Re: [PATCH] Fix PR59330
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LNX dot 2 dot 00 dot 1311281548530 dot 8615 at zhemvz dot fhfr dot qr> <CAMe9rOrPXeLx+DrbHdGHFzSMC7DRc3o6VP1FpT8XcWKtPbM+zw at mail dot gmail dot com> <20131128210411 dot GQ892 at tucnak dot redhat dot com>
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 <rguenther@suse.de> wrote:
> > >
> > > Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.
> > >
> > > Richard.
> > >
> > > 2013-11-28 Richard Biener <rguenther@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 <rguenther@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);
}
}