On Mon, Nov 26, 2012 at 4:27 PM, Jakub Jelinek <ja...@redhat.com> wrote: > On Mon, Nov 26, 2012 at 04:24:41PM +0100, Richard Biener wrote: >> On Thu, Nov 15, 2012 at 9:09 PM, Jakub Jelinek <ja...@redhat.com> wrote: >> > On the following testcase substitute_and_fold ICEs because memmove >> > of length 1 on an empty class is optimized away, and this function wasn't >> > prepared to handle that. >> > >> > Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for >> > trunk/4.7? >> >> I think the bug is that the stmt is removed. fold_stmt is not supposed to >> "remove" the stmt in any case - it may replace it with a gimple_nop at most. >> >> Thus, gimplify_and_update_call_from_tree is at fault here. >> >> I am testing a patch that fixes it. > > Note that fold_stmt_1 also has code to handle a call folding into nothing, > so perhaps that could be removed too if you change it to fold into a nop > instead.
Yeah, I'm testing a patch to remove that. Richard. > Jakub