boehm.c (mark_reference_fields): Compute % in HOST_WIDE_INT type.

* 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
This commit is contained in:
Jakub Jelinek 2009-09-01 12:18:34 +02:00 committed by Jakub Jelinek
parent d3bc57f281
commit 437926c09e
4 changed files with 15 additions and 4 deletions

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

View 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

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

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