Commit 64c31785 by Kai Tietz Committed by Kai Tietz

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
parent df72d556
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.
2010-05-26 Jan Hubicka <jh@suse.cz> 2010-05-26 Jan Hubicka <jh@suse.cz>
* cgraphunit.c (verify_cgraph_node): Do checking that DECL match * cgraphunit.c (verify_cgraph_node): Do checking that DECL match
......
...@@ -480,7 +480,11 @@ narrowest_unsigned_type (unsigned HOST_WIDE_INT low, ...@@ -480,7 +480,11 @@ narrowest_unsigned_type (unsigned HOST_WIDE_INT low,
for (; itk < itk_none; itk += 2 /* skip unsigned types */) for (; itk < itk_none; itk += 2 /* skip unsigned types */)
{ {
tree upper = TYPE_MAX_VALUE (integer_types[itk]); tree upper;
if (integer_types[itk] == NULL_TREE)
continue;
upper = TYPE_MAX_VALUE (integer_types[itk]);
if ((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (upper) > high if ((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (upper) > high
|| ((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (upper) == high || ((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (upper) == high
...@@ -508,7 +512,11 @@ narrowest_signed_type (unsigned HOST_WIDE_INT low, ...@@ -508,7 +512,11 @@ narrowest_signed_type (unsigned HOST_WIDE_INT low,
for (; itk < itk_none; itk += 2 /* skip signed types */) for (; itk < itk_none; itk += 2 /* skip signed types */)
{ {
tree upper = TYPE_MAX_VALUE (integer_types[itk]); tree upper;
if (integer_types[itk] == NULL_TREE)
continue;
upper = TYPE_MAX_VALUE (integer_types[itk]);
if ((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (upper) > high if ((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (upper) > high
|| ((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (upper) == high || ((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (upper) == high
......
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> 2010-05-26 Kai Tietz <kai.tietz@onevision.com>
* cp-tree.h (cp_decl_specifier_seq): Add new bifield * cp-tree.h (cp_decl_specifier_seq): Add new bifield
......
...@@ -4975,14 +4975,19 @@ layout_class_type (tree t, tree *virtuals_p) ...@@ -4975,14 +4975,19 @@ layout_class_type (tree t, tree *virtuals_p)
of the field. Then, we are supposed to use the left over of the field. Then, we are supposed to use the left over
bits as additional padding. */ bits as additional padding. */
for (itk = itk_char; itk != itk_none; ++itk) for (itk = itk_char; itk != itk_none; ++itk)
if (INT_CST_LT (DECL_SIZE (field), if (integer_types[itk] != NULL_TREE
TYPE_SIZE (integer_types[itk]))) && INT_CST_LT (DECL_SIZE (field),
TYPE_SIZE (integer_types[itk])))
break; break;
/* ITK now indicates a type that is too large for the /* ITK now indicates a type that is too large for the
field. We have to back up by one to find the largest field. We have to back up by one to find the largest
type that fits. */ 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 /* Figure out how much additional padding is required. GCC
3.2 always created a padding field, even if it had zero 3.2 always created a padding field, even if it had zero
......
...@@ -11402,7 +11402,8 @@ finish_enum (tree enumtype) ...@@ -11402,7 +11402,8 @@ finish_enum (tree enumtype)
itk++) itk++)
{ {
underlying_type = integer_types[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) && TYPE_UNSIGNED (underlying_type) == unsignedp)
break; break;
} }
......
...@@ -2055,7 +2055,8 @@ write_builtin_type (tree type) ...@@ -2055,7 +2055,8 @@ write_builtin_type (tree type)
it in the array of these nodes. */ it in the array of these nodes. */
iagain: iagain:
for (itk = 0; itk < itk_none; ++itk) 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. */ /* Print the corresponding single-letter code. */
write_char (integer_type_codes[itk]); write_char (integer_type_codes[itk]);
......
...@@ -1502,6 +1502,8 @@ emit_support_tinfos (void) ...@@ -1502,6 +1502,8 @@ emit_support_tinfos (void)
tree types[3]; tree types[3];
int i; int i;
if (bltn == NULL_TREE)
continue;
types[0] = bltn; types[0] = bltn;
types[1] = build_pointer_type (bltn); types[1] = build_pointer_type (bltn);
types[2] = build_pointer_type (cp_build_qualified_type (bltn, types[2] = build_pointer_type (cp_build_qualified_type (bltn,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment