c++: ICE on anon struct with base [PR96636]
authorJason Merrill <jason@redhat.com>
Fri, 30 Jul 2021 20:49:03 +0000 (16:49 -0400)
committerJason Merrill <jason@redhat.com>
Sat, 31 Jul 2021 14:43:42 +0000 (10:43 -0400)
commitaf76342b444948ab262b276cdf083c2d2e0cebbb
tree105ad963bd8472d3a17803ef488b4d76733ac624
parent5b759cdcb7f863520346e5bf63fcf1d3746c2cc3
c++: ICE on anon struct with base [PR96636]

pinski pointed out that my recent change to reject anonymous structs with
bases was relevant to this PR.  But we still ICEd after giving that error;
this fixes the ICE.

PR c++/96636

gcc/cp/ChangeLog:

* decl.c (fixup_anonymous_aggr): Clear TYPE_NEEDS_CONSTRUCTING
after error.

gcc/testsuite/ChangeLog:

* g++.dg/ext/anon-struct9.C: New test.
gcc/cp/decl.c
gcc/testsuite/g++.dg/ext/anon-struct9.C [new file with mode: 0644]