]> git.ipfire.org Git - thirdparty/gcc.git/commit
backport: re PR c++/84874 (internal compiler error: in reshape_init_class, at cp...
authorJakub Jelinek <jakub@redhat.com>
Fri, 22 Jun 2018 20:44:39 +0000 (22:44 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 22 Jun 2018 20:44:39 +0000 (22:44 +0200)
commit349fde3dad1e1e76d955656e479883368d04fb75
tree8388eb21ab5b48a385ac5a3dc67046f7eb2d6bb1
parent9074761258633a5499d5b569e989229b5b25e0d1
backport: re PR c++/84874 (internal compiler error: in reshape_init_class, at cp/decl.c:5800)

Backported from mainline
2018-03-16  Jakub Jelinek  <jakub@redhat.com>

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/cpp1z/desig7.C: New test.

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