mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-26 12:23:59 +08:00
stor-layout.c (initialize_sizetypes): Set SIZETYPE earlier, clear cache on copied sizetype.
* stor-layout.c (initialize_sizetypes): Set SIZETYPE earlier, clear cache on copied sizetype. * ada/utils2.c (build_allocator): Use build_int_cst for negative size types. * cp/class.c (build_vtbl_initializer): Use build_int_cst for negative size types. * cp/decl.c (complete_array_type): Likewise. * cp/method.c (finish_thunk): Likewise. From-SVN: r86320
This commit is contained in:
parent
346d5977dd
commit
3224beadb4
@ -1,3 +1,8 @@
|
||||
2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* stor-layout.c (initialize_sizetypes): Set SIZETYPE earlier,
|
||||
clear cache on copied sizetype.
|
||||
|
||||
2004-08-20 Ben Elliston <bje@au.ibm.com>
|
||||
|
||||
* configure.ac: Don't escape apostrophe in --enable-coverage help.
|
||||
@ -2785,7 +2790,7 @@
|
||||
* config/i386/xmmintrin.h: Include <mm_malloc.h>.
|
||||
|
||||
2004-08-03 H.J. Lu <hongjiu.lu@intel.com>
|
||||
Tanguy FautrÃ? <tfautre@pandora.be>
|
||||
Tanguy Fautrà <tfautre@pandora.be>
|
||||
|
||||
* config/i386/pmm_malloc.h: New file.
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* utils2.c (build_allocator): Use build_int_cst for negative
|
||||
size types.
|
||||
|
||||
2004-08-18 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* misc.c (LANG_HOOKS_HONOR_READONLY): Remove.
|
||||
|
@ -1799,7 +1799,7 @@ build_allocator (tree type, tree init, tree result_type, Entity_Id gnat_proc,
|
||||
/* If the size overflows, pass -1 so the allocator will raise
|
||||
storage error. */
|
||||
if (TREE_CODE (size) == INTEGER_CST && TREE_OVERFLOW (size))
|
||||
size = ssize_int (-1);
|
||||
size = build_int_cst (ssizetype, -1, -1);
|
||||
|
||||
storage = build_call_alloc_dealloc (NULL_TREE, size,
|
||||
TYPE_ALIGN (storage_type),
|
||||
@ -1872,7 +1872,7 @@ build_allocator (tree type, tree init, tree result_type, Entity_Id gnat_proc,
|
||||
/* If the size overflows, pass -1 so the allocator will raise
|
||||
storage error. */
|
||||
if (TREE_CODE (size) == INTEGER_CST && TREE_OVERFLOW (size))
|
||||
size = ssize_int (-1);
|
||||
size = build_int_cst (ssizetype, -1, -1);
|
||||
|
||||
/* If this is a type whose alignment is larger than the
|
||||
biggest we support in normal alignment and this is in
|
||||
|
@ -1,3 +1,10 @@
|
||||
2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* class.c (build_vtbl_initializer): Use build_int_cst for
|
||||
negative size types.
|
||||
* decl.c (complete_array_type): Likewise.
|
||||
* method.c (finish_thunk): Likewise.
|
||||
|
||||
2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
|
||||
|
||||
* tree.c: Remove unused mark_local_for_remap_r.
|
||||
|
@ -7278,7 +7278,8 @@ build_vtbl_initializer (tree binfo,
|
||||
vid.ctor_vtbl_p = !same_type_p (BINFO_TYPE (rtti_binfo), t);
|
||||
vid.generate_vcall_entries = true;
|
||||
/* The first vbase or vcall offset is at index -3 in the vtable. */
|
||||
vid.index = ssize_int (-3 * TARGET_VTABLE_DATA_ENTRY_DISTANCE);
|
||||
vid.index = build_int_cst (ssizetype,
|
||||
-3 * TARGET_VTABLE_DATA_ENTRY_DISTANCE, -1);
|
||||
|
||||
/* Add entries to the vtable for RTTI. */
|
||||
build_rtti_vtbl_entries (binfo, &vid);
|
||||
|
@ -5260,7 +5260,7 @@ complete_array_type (tree type, tree initial_value, int do_default)
|
||||
{
|
||||
tree elts = CONSTRUCTOR_ELTS (initial_value);
|
||||
|
||||
maxindex = ssize_int (-1);
|
||||
maxindex = build_int_cst (ssizetype, -1, -1);
|
||||
for (; elts; elts = TREE_CHAIN (elts))
|
||||
{
|
||||
if (TREE_PURPOSE (elts))
|
||||
|
@ -179,7 +179,9 @@ void
|
||||
finish_thunk (tree thunk)
|
||||
{
|
||||
tree function, name;
|
||||
tree fixed_offset = ssize_int (THUNK_FIXED_OFFSET (thunk));
|
||||
tree fixed_offset = build_int_cst (ssizetype,
|
||||
THUNK_FIXED_OFFSET (thunk),
|
||||
THUNK_FIXED_OFFSET (thunk) < 0 ? -1 : 0);
|
||||
tree virtual_offset = THUNK_VIRTUAL_OFFSET (thunk);
|
||||
|
||||
my_friendly_assert (!DECL_NAME (thunk) && DECL_THUNK_P (thunk), 20021127);
|
||||
|
@ -1863,12 +1863,12 @@ initialize_sizetypes (void)
|
||||
TYPE_MODE (t) = SImode;
|
||||
TYPE_ALIGN (t) = GET_MODE_ALIGNMENT (SImode);
|
||||
TYPE_USER_ALIGN (t) = 0;
|
||||
TYPE_IS_SIZETYPE (t) = 1;
|
||||
TYPE_SIZE (t) = build_int_cst (t, GET_MODE_BITSIZE (SImode), 0);
|
||||
TYPE_SIZE_UNIT (t) = build_int_cst (t, GET_MODE_SIZE (SImode), 0);
|
||||
TYPE_UNSIGNED (t) = 1;
|
||||
TYPE_PRECISION (t) = GET_MODE_BITSIZE (SImode);
|
||||
TYPE_MIN_VALUE (t) = build_int_cst (t, 0, 0);
|
||||
TYPE_IS_SIZETYPE (t) = 1;
|
||||
|
||||
/* 1000 avoids problems with possible overflow and is certainly
|
||||
larger than any size value we'd want to be storing. */
|
||||
@ -1878,6 +1878,8 @@ initialize_sizetypes (void)
|
||||
size_int_wide. */
|
||||
sizetype = t;
|
||||
bitsizetype = copy_node (t);
|
||||
TYPE_CACHED_VALUES (bitsizetype) = NULL_TREE;
|
||||
TYPE_CACHED_VALUES_P (bitsizetype) = 0;
|
||||
}
|
||||
|
||||
/* Set sizetype to TYPE, and initialize *sizetype accordingly.
|
||||
|
Loading…
Reference in New Issue
Block a user