This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix bootstrap issue on 32bit HWI hosts


This should address the issue seen by Geoffs tester.  I am in
the process of 1) reproducing the issue and 2) verifying the
fix below fixes the issue.  The patch below has already been
bootstrapped on x86_64-unknown-linux-gnu.

Richard.

2010-07-01  Richard Guenther  <rguenther@suse.de>

	* emit-rtl.c (set_mem_attributes_minus_bitpos): Use unsigned
	types for offsets.

Index: gcc/emit-rtl.c
===================================================================
--- gcc/emit-rtl.c	(revision 161657)
+++ gcc/emit-rtl.c	(working copy)
@@ -1616,10 +1616,10 @@ set_mem_attributes_minus_bitpos (rtx ref
     align = MAX (align, TYPE_ALIGN (type));
   else if (TREE_CODE (t) == MEM_REF)
     {
-      HOST_WIDE_INT aoff = BITS_PER_UNIT;
+      unsigned HOST_WIDE_INT aoff = BITS_PER_UNIT;
       if (host_integerp (TREE_OPERAND (t, 1), 1))
 	{
-	  HOST_WIDE_INT ioff = TREE_INT_CST_LOW (TREE_OPERAND (t, 1));
+	  unsigned HOST_WIDE_INT ioff = TREE_INT_CST_LOW (TREE_OPERAND (t, 1));
 	  aoff = (ioff & -ioff) * BITS_PER_UNIT;
 	}
       if (TREE_CODE (TREE_OPERAND (t, 0)) == ADDR_EXPR


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]