This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: tree-ssa: a weird (mis)optimization
Geert Bosch writes:
> On Nov 30, 2004, at 11:07, Andrew Haley wrote:
> > The problem here is that the line
> >
> > <tmp>_4 = x_3->length;
> >
> > has disappeared. This should not have happened, because the operation
> > should have may_trap_p() set -- we're deleting a trapping instruction.
>
> Does Java require a trap here, even if the result is not needed
> and the entire expression could otherwise be deleted?
Yes.
> If Java prevents such removal, we should find a way to express
> that so other languages don't lose the optimization.
Well, as far as I can see this is simply a bug. There is already
plenty of code in the compiler to make sure trapping insns aren't
deleted.
Andrew.