diff options
author | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-04-18 12:34:06 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-04-18 12:34:06 +0200 |
commit | 9574af76fa7dc94934c2a8918eb05cac01570e48 (patch) | |
tree | 7a07425e22d7835ec4a05d6a976e05fd5d5b356b | |
parent | ff146a59dd0cb24043897cf90ea011eb2aa3d38b (diff) | |
download | gcc-9574af76fa7dc94934c2a8918eb05cac01570e48.zip gcc-9574af76fa7dc94934c2a8918eb05cac01570e48.tar.gz gcc-9574af76fa7dc94934c2a8918eb05cac01570e48.tar.bz2 |
Reverted unintended part of previous commit.
From-SVN: r270439
-rw-r--r-- | gcc/c/c-decl.c | 19 | ||||
-rw-r--r-- | gcc/cp/decl.c | 19 |
2 files changed, 2 insertions, 36 deletions
diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index a788879..ef9b874 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -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)) diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index f7cfacc..67d9244 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -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)) |