re PR c++/90108 (ICE: Segmentation fault (in c_tree_chain_next))
authorJakub Jelinek <jakub@redhat.com>
Fri, 19 Apr 2019 08:24:05 +0000 (10:24 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 19 Apr 2019 08:24:05 +0000 (10:24 +0200)
commite7178413f46ac98975bd4b83e073c931b418205d
treef491d635b20c7ce83f8fe69a7cfcd1479503d80e
parent1ad6b2105127d761df87840f77a4fde06f1dbf9e
re PR c++/90108 (ICE: Segmentation fault (in c_tree_chain_next))

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.

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