]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
boehm.c (mark_reference_fields): Compute % in HOST_WIDE_INT type.
authorJakub Jelinek <jakub@redhat.com>
Tue, 1 Sep 2009 10:18:34 +0000 (12:18 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 1 Sep 2009 10:18:34 +0000 (12:18 +0200)
* boehm.c (mark_reference_fields): Compute % in HOST_WIDE_INT
type.

* gcc-interface/utils2.c (maybe_wrap_malloc, maybe_wrap_free): Cast
POINTER_SIZE to HOST_WIDE_INT.

From-SVN: r151263

gcc/ada/ChangeLog
gcc/ada/gcc-interface/utils2.c
gcc/java/ChangeLog
gcc/java/boehm.c

index 1723e41f485cf09975f8ac347b874521006d27e9..49d372cb4b541bcc9f5d1cdad130ea6f2b42c38d 100644 (file)
@@ -1,3 +1,8 @@
+2009-09-01  Jakub Jelinek  <jakub@redhat.com>
+
+       * gcc-interface/utils2.c (maybe_wrap_malloc, maybe_wrap_free): Cast
+       POINTER_SIZE to HOST_WIDE_INT.
+
 2009-09-01  Richard Guenther  <rguenther@suse.de>
 
        * gcc-interface/misc.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
index e60e5a093ae0103484c3d60dc16fb000eabfffff..b8ca814b6aa59ff75d20a56ae2c92e458e3070f6 100644 (file)
@@ -1972,7 +1972,8 @@ maybe_wrap_malloc (tree data_size, tree data_type, Node_Id gnat_node)
       tree storage_ptr_slot_addr
        = build_binary_op (POINTER_PLUS_EXPR, ptr_void_type_node,
                           convert (ptr_void_type_node, aligning_field_addr),
-                          size_int (-POINTER_SIZE/BITS_PER_UNIT));
+                          size_int (-(HOST_WIDE_INT) POINTER_SIZE
+                                    / BITS_PER_UNIT));
 
       tree storage_ptr_slot
        = build_unary_op (INDIRECT_REF, NULL_TREE,
@@ -2013,7 +2014,7 @@ maybe_wrap_free (tree data_ptr, tree data_type)
        = build_binary_op
          (POINTER_PLUS_EXPR, ptr_void_type_node,
           convert (ptr_void_type_node, data_ptr),
-          size_int (-POINTER_SIZE/BITS_PER_UNIT));
+          size_int (-(HOST_WIDE_INT) POINTER_SIZE / BITS_PER_UNIT));
 
       /* FREE_PTR (void *) = *(void **)DATA_FRONT_PTR  */
       free_ptr
index a291dffe599d327c8cf252066fc53b83100711af..1437c5a2f5433da3ba4c667335d8e51808c00aa2 100644 (file)
@@ -1,3 +1,8 @@
+2009-09-01  Jakub Jelinek  <jakub@redhat.com>
+
+       * boehm.c (mark_reference_fields): Compute % in HOST_WIDE_INT
+       type.
+
 2009-09-01  Richard Guenther  <rguenther@suse.de>
 
        * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
index 5c65c8bb0cc392c5fe57da8f82692ef7574a9e34..04af74b5948f9ca2dda10d71008546d2525ee70c 100644 (file)
@@ -1,5 +1,5 @@
 /* Functions related to the Boehm garbage collector.
-   Copyright (C) 2000, 2003, 2004, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2003, 2004, 2006, 2009 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -111,7 +111,7 @@ mark_reference_fields (tree field,
             we already covered, then we are doomed.  */
          gcc_assert (offset > *last_view_index);
 
-         if (offset % (POINTER_SIZE / BITS_PER_UNIT))
+         if (offset % (HOST_WIDE_INT) (POINTER_SIZE / BITS_PER_UNIT))
            {
              *all_bits_set = -1;
              *pointer_after_end = 1;