This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: tree-ssa: a weird (mis)optimization
On Tue, Nov 30, 2004 at 06:14:52PM +0000, Andrew Haley wrote:
> > > <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.
Then you're going to have to mark this as a volatile load.
Because the result *is* dead, and there's nothing else to
keep this load from being deleted.
r~