Patchwork Fix libmudflap.c++/pass57-frag.cxx

login
register
mail settings
Submitter Jakub Jelinek
Date Aug. 20, 2010, 3:53 p.m.
Message ID <20100820155315.GE702@tyan-ft48-01.lab.bos.redhat.com>
Download mbox | patch
Permalink /patch/62289/
State New
Headers show

Comments

Jakub Jelinek - Aug. 20, 2010, 3:53 p.m.
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.


	Jakub

Patch

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