On Sat, Mar 12, 2016 at 01:26:39AM -0700, Jeff Law wrote:
> On 03/12/2016 12:58 AM, Jakub Jelinek wrote:
> >On Sat, Mar 12, 2016 at 09:43:50AM +1030, Alan Modra wrote:
> >>The underlying problem happens somewhere in tree-ssa-dse.c.  So we get
> >>an indirect jump to a random location instead of a jump to 0.
> >
> >Well, the testcase is there just to make sure we don't ICE on it.
> >And, changing just DSE can't be a complete solution, because one can use
> >uninitialized var from the beginning:
> >int
> >foo (void)
> >{
> >   int x;
> >   goto *&x;
> >}
> >
> >     Jakub
> >
> I believe Alan's point is DSE deleted the assignment to x which can't be
> right as long as we've left in goto *&x.
> 
> The goto *&x should be a use of x and thus should have kept the assignment
> live.

Right, I wasn't trying to say that ira.c:indirect_jump_optimize is
OK.  It needs the patch I posted or perhaps even better a test of
DF_REF_INSN_INFO rather than !DF_REF_IS_ARTIFICIAL (simply because the
flag test is reading another field, and we need to read
DF_REF_INSN_INFO anyway).

-- 
Alan Modra
Australia Development Lab, IBM

Reply via email to