[PATCH] Remove bogus PLUS_EXPR -> POINTER_PLUS_EXPR folding
Andrew Haley
aph@redhat.com
Fri Jan 16 18:47:00 GMT 2009
Richard Guenther wrote:
> 2009年01月16日 Richard Guenther <rguenther@suse.de>
>> PR tree-optimization/38835
> PR middle-end/36227
>> java/
> * builtins.c (build_addr_sum): Use POINTER_PLUS_EXPR.
>> Index: gcc/java/builtins.c
> ===================================================================
> *** gcc/java/builtins.c (revision 143429)
> --- gcc/java/builtins.c (working copy)
> *************** static tree
> *** 265,273 ****
> build_addr_sum (tree type, tree addr, tree offset)
> {
> tree ptr_type = build_pointer_type (type);
> ! return fold_build2 (PLUS_EXPR,
> ! ptr_type,
> ! fold_convert (ptr_type, addr), offset);
> }
>> /* Make sure that this-arg is non-NULL. This is a security check. */
> --- 265,274 ----
> build_addr_sum (tree type, tree addr, tree offset)
> {
> tree ptr_type = build_pointer_type (type);
> ! return fold_build2 (POINTER_PLUS_EXPR,
> ! ptr_type,
> ! fold_convert (ptr_type, addr),
> ! fold_convert (sizetype, offset));
> }
>> /* Make sure that this-arg is non-NULL. This is a security check. */
OK.
Andrew.
More information about the Java
mailing list