From patchwork Fri Aug 20 15:53:15 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Fix libmudflap.c++/pass57-frag.cxx Date: Fri, 20 Aug 2010 05:53:15 -0000 From: Jakub Jelinek X-Patchwork-Id: 62289 Message-Id: <20100820155315.GE702@tyan-ft48-01.lab.bos.redhat.com> To: gcc-patches@gcc.gnu.org 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 Michael Matz * tree-ssa-address.c (tree_mem_ref_addr): Convert offset to sizetype. Jakub --- 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