https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90108
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Fri Apr 19 08:24:05 2019 New Revision: 270453 URL: https://gcc.gnu.org/viewcvs?rev=270453&root=gcc&view=rev Log: PR c++/90108 * c-decl.c (merge_decls): If remove is main variant and DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE variant that has newdecl as TYPE_NAME if any. * decl.c (duplicate_decls): If remove is main variant and DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE variant that has newdecl as TYPE_NAME if any. * c-c++-common/pr90108.c: New test. Added: trunk/gcc/testsuite/c-c++-common/pr90108.c Modified: trunk/gcc/c/ChangeLog trunk/gcc/c/c-decl.c trunk/gcc/cp/ChangeLog trunk/gcc/cp/decl.c trunk/gcc/testsuite/ChangeLog