]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gcc/cp/
authorktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 27 May 2010 08:13:58 +0000 (08:13 +0000)
committerktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 27 May 2010 08:13:58 +0000 (08:13 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159912 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/c-lex.c
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/decl.c
gcc/cp/mangle.c
gcc/cp/rtti.c

index 3469a72d22a30e816dbdfbf8036eb3a004b6d079..9489194f9f75b04fb13849c2443437b5da7d1ac1 100644 (file)
@@ -1,3 +1,9 @@
+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>
 
        * cgraphunit.c (verify_cgraph_node): Do checking that DECL match
index 22a0068eb09f1da35c79db83e1eac46d5fb251bc..6deec260d950f237b7ecf4dc5a05b3810fc66247 100644 (file)
@@ -480,7 +480,11 @@ narrowest_unsigned_type (unsigned HOST_WIDE_INT low,
 
   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
          || ((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (upper) == high
@@ -508,7 +512,11 @@ narrowest_signed_type (unsigned HOST_WIDE_INT low,
 
   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
          || ((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (upper) == high
index c058ac1e134ccfa40f93d5c002e4801f756b2349..81aa7c17fb815b3afbf7caacc8c84cbe660c345c 100644 (file)
@@ -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
index 523f401e86871c022b525dc0cf3649d087ecdf74..c2831c1a4858f44ded9e770d5d0801abf8d50350 100644 (file)
@@ -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
index 495660dec2947e05f5b3ca9de49cb30aadf4a0bc..e560cb47b1d326b42723185e7a05d28bc4ab291e 100644 (file)
@@ -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;
         }
index a8a80a9b5357d318798cdd79555bae3bf69dc0a0..e8259521adb92cec5c256686fc533a1f00d01e96 100644 (file)
@@ -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]);
index 17664f57ed510eac2fc440e7bc09d0ffbba64f9f..62aa9212929530e149ab140fc9dc6a5448d6894d 100644 (file)
@@ -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,