re PR c++/84874 (internal compiler error: in reshape_init_class, at cp/decl.c:5800)
authorJakub Jelinek <jakub@redhat.com>
Fri, 16 Mar 2018 08:05:06 +0000 (09:05 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 16 Mar 2018 08:05:06 +0000 (09:05 +0100)
commit828fd2fbe88ee6adb16b708d584caf96237046da
tree81a5f7d4c499c01ce8318c0eb2dc2855b3f87e64
parent9f3599c044810c4fd17f1f36ec024c55a35021fd
re PR c++/84874 (internal compiler error: in reshape_init_class, at cp/decl.c:5800)

PR c++/84874
* decl.c (reshape_init_class): Don't assert d->cur->index == field
if d->cur->index is a FIELD_DECL, instead set field to d->cur->index.

* g++.dg/cpp2a/desig7.C: New test.

From-SVN: r258585
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp2a/desig7.C [new file with mode: 0644]