aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@gcc.gnu.org>2004-08-20 14:17:39 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2004-08-20 14:17:39 +0000
commit3224beadb4cebe8137600efe3d13082f40076cc1 (patch)
treed83bea008f3292c8941443cff196c20fd0023ab4 /gcc
parent346d5977dd043c0f83a7e68169a970bd4a4a1b31 (diff)
downloadgcc-3224beadb4cebe8137600efe3d13082f40076cc1.zip
gcc-3224beadb4cebe8137600efe3d13082f40076cc1.tar.gz
gcc-3224beadb4cebe8137600efe3d13082f40076cc1.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/utils2.c4
-rw-r--r--gcc/cp/ChangeLog7
-rw-r--r--gcc/cp/class.c3
-rw-r--r--gcc/cp/decl.c2
-rw-r--r--gcc/cp/method.c4
-rw-r--r--gcc/stor-layout.c4
8 files changed, 29 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e6471f7..d6bba04 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 7bc0828..6ea3282 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -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.
diff --git a/gcc/ada/utils2.c b/gcc/ada/utils2.c
index 726c9f2..60de87d 100644
--- a/gcc/ada/utils2.c
+++ b/gcc/ada/utils2.c
@@ -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
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index cf2e0b8..372c27e 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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.
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 1989dca..c729414 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -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);
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 0c60f3c..36e83d9 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -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))
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 13fe0a4..d0bad5d 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -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);
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 156702f..19de9b6 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -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.