aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorKai Tietz <kai.tietz@onevision.com>2010-05-27 08:13:58 +0000
committerKai Tietz <ktietz@gcc.gnu.org>2010-05-27 10:13:58 +0200
commit64c31785445fdd307b4d918747825405def267d1 (patch)
tree04b352125b3c30f7b7e9831b54f686d56cfba379 /gcc/cp
parentdf72d556a5c8cf32bf2157396e9d261c0e58bee7 (diff)
downloadgcc-64c31785445fdd307b4d918747825405def267d1.zip
gcc-64c31785445fdd307b4d918747825405def267d1.tar.gz
gcc-64c31785445fdd307b4d918747825405def267d1.tar.bz2
re PR bootstrap/44287 (Failed to bootstrap)
gcc/cp/ 2010-05-27 Kai Tietz <kai.tietz@onevision.com> PR bootstrap/44287 * rtti.c (emit_support_tinfos): Check for NULL_TREE. * class.c (layout_class_type): Likewise. * decl.c (finish_enum): Likewise. * mangle.c (write_builitin_type): Likewise. gcc/ 2010-05-27 Kai Tietz <kai.tietz@onevision.com> PR bootstrp/44287 * c-lex.c (narrowest_unsigned_type): Check for NULL_TREE. (narrow_signed_type): Likewise. From-SVN: r159912
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog8
-rw-r--r--gcc/cp/class.c11
-rw-r--r--gcc/cp/decl.c3
-rw-r--r--gcc/cp/mangle.c3
-rw-r--r--gcc/cp/rtti.c2
5 files changed, 22 insertions, 5 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index c058ac1..81aa7c1 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,11 @@
+2010-05-27 Kai Tietz <kai.tietz@onevision.com>
+
+ PR bootstrap/44287
+ * rtti.c (emit_support_tinfos): Check for NULL_TREE.
+ * class.c (layout_class_type): Likewise.
+ * decl.c (finish_enum): Likewise.
+ * mangle.c (write_builitin_type): Likewise.
+
2010-05-26 Kai Tietz <kai.tietz@onevision.com>
* cp-tree.h (cp_decl_specifier_seq): Add new bifield
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 523f401..c2831c1 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -4975,14 +4975,19 @@ layout_class_type (tree t, tree *virtuals_p)
of the field. Then, we are supposed to use the left over
bits as additional padding. */
for (itk = itk_char; itk != itk_none; ++itk)
- if (INT_CST_LT (DECL_SIZE (field),
- TYPE_SIZE (integer_types[itk])))
+ if (integer_types[itk] != NULL_TREE
+ && INT_CST_LT (DECL_SIZE (field),
+ TYPE_SIZE (integer_types[itk])))
break;
/* ITK now indicates a type that is too large for the
field. We have to back up by one to find the largest
type that fits. */
- integer_type = integer_types[itk - 1];
+ do
+ {
+ --itk;
+ integer_type = integer_types[itk];
+ } while (itk > 0 && integer_type == NULL_TREE);
/* Figure out how much additional padding is required. GCC
3.2 always created a padding field, even if it had zero
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 495660d..e560cb4 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -11402,7 +11402,8 @@ finish_enum (tree enumtype)
itk++)
{
underlying_type = integer_types[itk];
- if (TYPE_PRECISION (underlying_type) >= precision
+ if (underlying_type != NULL_TREE
+ && TYPE_PRECISION (underlying_type) >= precision
&& TYPE_UNSIGNED (underlying_type) == unsignedp)
break;
}
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c
index a8a80a9..e825952 100644
--- a/gcc/cp/mangle.c
+++ b/gcc/cp/mangle.c
@@ -2055,7 +2055,8 @@ write_builtin_type (tree type)
it in the array of these nodes. */
iagain:
for (itk = 0; itk < itk_none; ++itk)
- if (type == integer_types[itk])
+ if (integer_types[itk] != NULL_TREE
+ && type == integer_types[itk])
{
/* Print the corresponding single-letter code. */
write_char (integer_type_codes[itk]);
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c
index 17664f5..62aa921 100644
--- a/gcc/cp/rtti.c
+++ b/gcc/cp/rtti.c
@@ -1502,6 +1502,8 @@ emit_support_tinfos (void)
tree types[3];
int i;
+ if (bltn == NULL_TREE)
+ continue;
types[0] = bltn;
types[1] = build_pointer_type (bltn);
types[2] = build_pointer_type (cp_build_qualified_type (bltn,