[PATCH] Fix tree-opt/29059, ICE with the recent builtins improvements

Roger Sayle roger@eyesopen.com
Sat Sep 16 18:55:00 GMT 2006


Hi Andrew,

On Thu, 14 Sep 2006, Andrew Pinski wrote:
> 	* tree-ssa-propagate.c (set_rhs): Reject MODIFY_EXPR right
> 	away for the expr argument.
>
> 	* gcc.c-torture/compile/strcpy-1.c: New test.
> 	* gcc.c-torture/compile/strcpy-2.c: New test.
> 	* gcc.c-torture/compile/memcpy-1.c: New test.
> 	* gcc.c-torture/compile/memcpy-2.c: New test.

This is OK for mainline.  Thanks.

Speaking of potential improvements to this code for 4.3, I think that
I'd much prefer the tests in set_rhs to be tests of inclusion rather
than of exclusion.  Instead of rejecting COMPOUND_EXPR and MODIFY_EXPR,
it would be better to test for the things that we should allow, akin
to is_gimple_formal_tmp_rhs but with operand checking.  For example,
I suspect that we should probably be handling tcc_comparison class
experssions identically to tcc_binary?

However, this minimal patch resolves the current regression just fine.

:REVIEWMAIL:

Roger
--



More information about the Gcc-patches mailing list