re PR c/89933 (ICE in merge_decls, at c/c-decl.c:2517)
authorJakub Jelinek <jakub@redhat.com>
Fri, 12 Apr 2019 21:45:54 +0000 (23:45 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 12 Apr 2019 21:45:54 +0000 (23:45 +0200)
commit60a2c64519087972b16d94f6cca209fa6a3f0940
tree8b402ce47953b06b0ba0f3744ac961fa763a6ce3
parentbb50312e027994bb5260163a9c021b5444f86257
re PR c/89933 (ICE in merge_decls, at c/c-decl.c:2517)

PR c/89933
c/
* c-decl.c (merge_decls): When newdecl's type is its main variant,
don't try to remove it from the variant list, but instead assert
it has no variants.
cp/
* decl.c (duplicate_decls): When newdecl's type is its main variant,
don't try to remove it from the variant list, but instead assert
it has no variants.
testsuite/
* c-c++-common/pr89933.c: New test.

From-SVN: r270329
gcc/c/ChangeLog
gcc/c/c-decl.c
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/pr89933.c [new file with mode: 0644]