Re: [PATCH] Fix fold_stmt ICE (PR c++/49264)

2011-06-06 Thread Jakub Jelinek
On Mon, Jun 06, 2011 at 01:41:14PM +0200, Richard Guenther wrote: > > I think NULL new_stmt would have the advantage that we wouldn't duplicate > > the complex code looping through all kinds of clones. > > Yeah, I'd prefer that variant. Honza? Ok, after further discussions with Honza on IRC here

Re: [PATCH] Fix fold_stmt ICE (PR c++/49264)

2011-06-06 Thread Richard Guenther
On Mon, Jun 6, 2011 at 1:19 PM, Jakub Jelinek wrote: > On Mon, Jun 06, 2011 at 11:30:19AM +0200, Richard Guenther wrote: >> On Fri, Jun 3, 2011 at 3:55 PM, Jakub Jelinek wrote: >> > --- gcc/tree-inline.c.jj        2011-06-02 10:15:20.0 +0200 >> > +++ gcc/tree-inline.c   2011-06-03 09:29:1

Re: [PATCH] Fix fold_stmt ICE (PR c++/49264)

2011-06-06 Thread Jakub Jelinek
On Mon, Jun 06, 2011 at 11:30:19AM +0200, Richard Guenther wrote: > On Fri, Jun 3, 2011 at 3:55 PM, Jakub Jelinek wrote: > > --- gcc/tree-inline.c.jj        2011-06-02 10:15:20.0 +0200 > > +++ gcc/tree-inline.c   2011-06-03 09:29:15.0 +0200 > > @@ -4108,6 +4108,14 @@ fold_marked_st

Re: [PATCH] Fix fold_stmt ICE (PR c++/49264)

2011-06-06 Thread Richard Guenther
On Fri, Jun 3, 2011 at 3:55 PM, Jakub Jelinek wrote: > Hi! > > If memcpy is folded into an assignment, that assignment can be for C++ > folded into nothing (if it is copying of 1 byte from or to empty C++ class). > gimple-fold.c was changed to handle that case in some spots, but not all, > particu

[PATCH] Fix fold_stmt ICE (PR c++/49264)

2011-06-03 Thread Jakub Jelinek
Hi! If memcpy is folded into an assignment, that assignment can be for C++ folded into nothing (if it is copying of 1 byte from or to empty C++ class). gimple-fold.c was changed to handle that case in some spots, but not all, particularly if that memcpy is the last stmt in a basic block (which can