c++: missing aggregate base ctor [PR102045]
authorJason Merrill <jason@redhat.com>
Sun, 27 Mar 2022 00:38:54 +0000 (20:38 -0400)
committerJason Merrill <jason@redhat.com>
Mon, 28 Mar 2022 13:35:58 +0000 (09:35 -0400)
commit72bdfcb848327020f62f72405d72cf85650666e1
tree3b9160419fec1da6e98049581f2e546a651430d3
parent71e1db540c01a13b01fae054c92878a79252b471
c++: missing aggregate base ctor [PR102045]

When make_base_init_ok changes a call to a complete constructor into a call
to a base constructor, we were never marking the base ctor as used, so it
didn't get emitted.

PR c++/102045

gcc/cp/ChangeLog:

* call.cc (make_base_init_ok): Call make_used.

gcc/testsuite/ChangeLog:

* g++.dg/cpp1z/aggr-base12.C: New test.
gcc/cp/call.cc
gcc/testsuite/g++.dg/cpp1z/aggr-base12.C [new file with mode: 0644]