[Committed] Fix PR middle-end/31095 ICE in expand_expr_real_1, at expr.c:8786

Andrew_Pinski@PlayStation.Sony.Com Andrew_Pinski@PlayStation.Sony.Com
Wed May 23 01:13:00 GMT 2007


Hi,
  The problem here is that expand_builtin_memmove_args forgot that 
fold_builtin_memory_op could return a NOP_EXPR around the COUMPOUND_EXPR 
which causes an ICE in expand_expr_real_1 (which no longer handles 
COMPOUND_EXPR).  expand_builtin_memmove_args already handles 
COMPOUND_EXPRs correct, this patch just adds a STRIP_TYPE_NOPS which 
allows  expand_builtin_memmove_args to handle this case also.

Committed as obvious after a bootstrap/test on i686-linux-gnu with no 
regressions and a build/test on spu-elf with no regressions.

Thanks,
Andrew Pinski

ChangeLog:

        * builtins.c (expand_builtin_memmove_args): Strip nops that don't 
change
        the type before looking for a COMPOUND_EXPR.

        * gcc.c-torture/compile/bcopy-1.c: New testcase.



More information about the Gcc-patches mailing list