[PATCH] Fix libmudflap.c++/pass57-frag.cxx

Jakub Jelinek jakub@redhat.com
Fri Aug 20 16:58:00 GMT 2010


Hi!

Richard changed 4 days ago TARGET_MEM_REF representation, the offset
now uses some pointer type for offsets on the constants instead of
sizetype.
The following patch makes sure we don't create invalid
PLUS_EXPR with sizetype first operand and result, but pointer type
INTEGER_CST as second argument.

Bootstrapped/regtested on x86_64-linux and i686-linux, committing as
obvious.

2010-08-20  Jakub Jelinek  <jakub@redhat.com>
	    Michael Matz  <matz@suse.de>

	* tree-ssa-address.c (tree_mem_ref_addr): Convert offset to
	sizetype.

--- gcc/tree-ssa-address.c.jj	2010-08-16 19:24:24.000000000 +0200
+++ gcc/tree-ssa-address.c	2010-08-20 15:53:03.000000000 +0200
@@ -299,6 +299,7 @@ tree_mem_ref_addr (tree type, tree mem_r
 
   if (offset && !integer_zerop (offset))
     {
+      offset = fold_convert (sizetype, offset);
       if (addr_off)
 	addr_off = fold_build2 (PLUS_EXPR, sizetype, addr_off, offset);
       else

	Jakub



More information about the Gcc-patches mailing list