Re: [PATCH] Fix latent bug in replace_uses_by

2014-02-21 Thread Richard Biener
On Fri, 21 Feb 2014, Bin.Cheng wrote: > On Thu, Feb 20, 2014 at 10:51 PM, Richard Biener wrote: > > > > The following fixes an ICE I got when building libjava with a local > > patch. This causes us to substitute &MEM[&a, 5] into MEM[_3, 0] > > to MEM[&MEM[&a, 5], 0] and then asking stmt_ends_bb_

Re: [PATCH] Fix latent bug in replace_uses_by

2014-02-21 Thread Bin.Cheng
On Thu, Feb 20, 2014 at 10:51 PM, Richard Biener wrote: > > The following fixes an ICE I got when building libjava with a local > patch. This causes us to substitute &MEM[&a, 5] into MEM[_3, 0] > to MEM[&MEM[&a, 5], 0] and then asking stmt_ends_bb_p which doesn't > expect such bogus MEM_REFs. Th

[PATCH] Fix latent bug in replace_uses_by

2014-02-20 Thread Richard Biener
The following fixes an ICE I got when building libjava with a local patch. This causes us to substitute &MEM[&a, 5] into MEM[_3, 0] to MEM[&MEM[&a, 5], 0] and then asking stmt_ends_bb_p which doesn't expect such bogus MEM_REFs. The MEM_REF is canonicalized by calling fold_stmt on it later, but t