]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Reverted unintended part of previous commit.
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 18 Apr 2019 10:34:06 +0000 (10:34 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 18 Apr 2019 10:34:06 +0000 (10:34 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270439 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/c/c-decl.c
gcc/cp/decl.c

index a788879df6d9c96c38b77bfe03e59e5008a2d921..ef9b874f997762cd456736c426d9281c95dc49b1 100644 (file)
@@ -2513,24 +2513,7 @@ merge_decls (tree newdecl, tree olddecl, tree newtype, tree oldtype)
        {
          tree remove = TREE_TYPE (newdecl);
          if (TYPE_MAIN_VARIANT (remove) == remove)
-           {
-             gcc_assert (TYPE_NEXT_VARIANT (remove) == NULL_TREE);
-             /* If remove is the main variant, no need to remove that
-                from the list.  One of the DECL_ORIGINAL_TYPE
-                variants, e.g. created for aligned attribute, might still
-                refer to the newdecl TYPE_DECL though, so remove that one
-                in that case.  */
-             if (DECL_ORIGINAL_TYPE (newdecl)
-                 && DECL_ORIGINAL_TYPE (newdecl) != remove)
-               for (tree t = TYPE_MAIN_VARIANT (DECL_ORIGINAL_TYPE (newdecl));
-                    ; t = TYPE_MAIN_VARIANT (t))
-                 if (TYPE_NAME (TYPE_NEXT_VARIANT (t)) == newdecl)
-                   {
-                     TYPE_NEXT_VARIANT (t)
-                       = TYPE_NEXT_VARIANT (TYPE_NEXT_VARIANT (t));
-                     break;
-                   }
-           }       
+           gcc_assert (TYPE_NEXT_VARIANT (remove) == NULL_TREE);
          else
            for (tree t = TYPE_MAIN_VARIANT (remove); ;
                 t = TYPE_NEXT_VARIANT (t))
index f7cfacceb9fa5fd2ff52758b907c7a3800685d0f..67d9244c450e3fb878064f243454461644c1ab4c 100644 (file)
@@ -2133,24 +2133,7 @@ next_arg:;
            {
              tree remove = TREE_TYPE (newdecl);
              if (TYPE_MAIN_VARIANT (remove) == remove)
-               {
-                 gcc_assert (TYPE_NEXT_VARIANT (remove) == NULL_TREE);
-                 /* If remove is the main variant, no need to remove that
-                    from the list.  One of the DECL_ORIGINAL_TYPE
-                    variants, e.g. created for aligned attribute, might still
-                    refer to the newdecl TYPE_DECL though, so remove that one
-                    in that case.  */
-                 if (tree orig = DECL_ORIGINAL_TYPE (newdecl))
-                   if (orig != remove)
-                     for (tree t = TYPE_MAIN_VARIANT (orig); ;
-                          t = TYPE_MAIN_VARIANT (t))
-                       if (TYPE_NAME (TYPE_NEXT_VARIANT (t)) == newdecl)
-                         {
-                           TYPE_NEXT_VARIANT (t)
-                             = TYPE_NEXT_VARIANT (TYPE_NEXT_VARIANT (t));
-                           break;
-                         }
-               }           
+               gcc_assert (TYPE_NEXT_VARIANT (remove) == NULL_TREE);
              else
                for (tree t = TYPE_MAIN_VARIANT (remove); ;
                     t = TYPE_NEXT_VARIANT (t))