diff options
author | Jakub Jelinek <jakub@redhat.com> | 2019-04-18 12:28:21 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-04-18 12:28:21 +0200 |
commit | ff146a59dd0cb24043897cf90ea011eb2aa3d38b (patch) | |
tree | e311bd832b00f22e2cfd4f8f46335127c7a1ef5a /gcc/c/c-decl.c | |
parent | 1b73c7ef7c9c3c04610bc2d2819affea917d91d2 (diff) | |
download | gcc-ff146a59dd0cb24043897cf90ea011eb2aa3d38b.zip gcc-ff146a59dd0cb24043897cf90ea011eb2aa3d38b.tar.gz gcc-ff146a59dd0cb24043897cf90ea011eb2aa3d38b.tar.bz2 |
re PR translation/79183 (Hard coded plurals in gimple-ssa-sprintf.c:2050)
PR translation/79183
* gimple-ssa-sprintf.c (format_directive): Use inform_n instead of
inform where appropriate.
From-SVN: r270438
Diffstat (limited to 'gcc/c/c-decl.c')
-rw-r--r-- | gcc/c/c-decl.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index ef9b874..a788879 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -2513,7 +2513,24 @@ 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); + { + 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; + } + } else for (tree t = TYPE_MAIN_VARIANT (remove); ; t = TYPE_NEXT_VARIANT (t)) |