[Bug c/89933] [7/8 Regression] ICE in merge_decls, at c/c-decl.c:2517

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89933

--- Comment #6 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 21:05:00 2019
New Revision: 270751

URL: https://gcc.gnu.org/viewcvs?rev=270751&root=gcc&view=rev
Log:
Backported from mainline
2019-04-12  Jakub Jelinek  

PR c/89933
* 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.

* 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.

* c-c++-common/pr89933.c: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/c-c++-common/pr89933.c
Modified:
branches/gcc-8-branch/gcc/c/ChangeLog
branches/gcc-8-branch/gcc/c/c-decl.c
branches/gcc-8-branch/gcc/cp/ChangeLog
branches/gcc-8-branch/gcc/cp/decl.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug c/89933] [7/8 Regression] ICE in merge_decls, at c/c-decl.c:2517

2019-04-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89933

Jakub Jelinek  changed:

   What|Removed |Added

Summary|[7/8/9 Regression] ICE in   |[7/8 Regression] ICE in
   |merge_decls, at |merge_decls, at
   |c/c-decl.c:2517 |c/c-decl.c:2517

--- Comment #5 from Jakub Jelinek  ---
Fixed on the trunk so far.