------- Additional Comments From jakub at redhat dot com 2005-03-30 07:56 ------- Subject: Re: [PR tree-optimization/20640] add phi args to dests of dce-redirected edges
On Wed, Mar 30, 2005 at 02:56:24AM -0300, Alexandre Oliva wrote: > When remove_dead_stmt() redirects a control stmt, the edge redirection > reserves space for the phi arg for the new incoming edge in all phi > nodes, but, instead of filling them in with information obtained from > the edge redirection, we simply discard this information. This leaves > NULL in the phi args, which may cause crashes later on. > > This patch fixes the problem by filling in the phi args using the > PENDING_STMT list created during edge redirection. This appears to be > the intended use for this information, and it is used similarly in > e.g. loop unrolling. > > Bootstrapping mainline and 4.0 branch on amd64-linux-gnu, and mainline > on i686-pc-linux-gnu. Ok to install if bootstrap and regtesting pass? > > The patch below is for the 4.0 branch, but it applies cleanly and > correctly in mainline as well, since it's just a few lines off. Note this is PR tree-optimization/20640, not PR 20460 (typo in ChangeLog as well as subject line, while the testcase is ok). Jakub -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20640