[PATCH] Fix PR33146, ICE in build_polynomial_chrec; NEGATE_EXPR of pointers

Ian Lance Taylor iant@google.com
Fri Sep 21 16:05:00 GMT 2007

Richard Guenther <rguenther@suse.de> writes:

> Does this look like a sane approach?  (Of course I believe yes ;))
> 2007-09-21  Richard Guenther  <rguenther@suse.de>
> 	PR tree-optimization/33146
> 	* fold-const.c (fold_binary): Use the original tree
> 	for negating.
> 	* tree.h (STRIP_SIGN_NOPS): Converting from or to pointer
> 	also changes "sign".
> 	* gcc.c-torture/compile/pr33146.c: New testcase.

This looks reasonable to me.

You should consider adding a comment to the code in fold-const.c.


More information about the Gcc-patches mailing list