[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:14:00 GMT 2007


Andrew Pinski/R&D/SCEA wrote on 05/22/2007 06:13:36 PM:

> 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.

This time with a patch :).

Thanks,
Andrew Pinski

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fix31095.diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070523/b2d7a07f/attachment.txt>


More information about the Gcc-patches mailing list