OSDN Git Service

* c-typeck.c (add_pending_init): Don't abort for multiple
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 20 Feb 2000 08:30:30 +0000 (08:30 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 20 Feb 2000 08:30:30 +0000 (08:30 +0000)
        fields at the same offset.
        (pending_init_member): Test the correct member.

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

gcc/ChangeLog
gcc/c-typeck.c

index 8479c7b..67623e1 100644 (file)
@@ -1,3 +1,9 @@
+2000-02-19  Richard Henderson  <rth@cygnus.com>
+
+       * c-typeck.c (add_pending_init): Don't abort for multiple
+       fields at the same offset.
+       (pending_init_member): Test the correct member.
+
 2000-02-19  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
 
        * except.c (start_dynamic_handler) : Use TYPE_MODE (integer_type_node)
index 7a5941e..6ce22c5 100644 (file)
@@ -5580,7 +5580,7 @@ add_pending_init (purpose, value)
          p = *q;
          if (tree_int_cst_lt (purpose, p->purpose))
            q = &p->left;
-         else if (tree_int_cst_lt (p->purpose, purpose))
+         else if (p->purpose != purpose)
            q = &p->right;
          else
            abort ();
@@ -5594,8 +5594,7 @@ add_pending_init (purpose, value)
          if (tree_int_cst_lt (DECL_FIELD_BITPOS (purpose),
                               DECL_FIELD_BITPOS (p->purpose)))
            q = &p->left;
-         else if (tree_int_cst_lt (DECL_FIELD_BITPOS (p->purpose),
-                                   DECL_FIELD_BITPOS (purpose)))
+         else if (p->purpose != purpose)
            q = &p->right;
          else
            abort ();
@@ -5780,7 +5779,7 @@ pending_init_member (field)
     {
       while (p)
        {
-         if (tree_int_cst_equal (field, p->purpose))
+         if (field == p->purpose)
            return 1;
          else if (tree_int_cst_lt (field, p->purpose))
            p = p->left;