PR c++/89214 - ICE when initializing aggregates with bases.
authorMarek Polacek <polacek@redhat.com>
Mon, 25 Mar 2019 16:38:48 +0000 (16:38 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Mon, 25 Mar 2019 16:38:48 +0000 (16:38 +0000)
commitbf8c1b11d560b377c46177d4bcfe146c8b220587
tree5c45e44201be32398ac31f7e6f8d373145b17cb6
parenta55f758221cfd574cc341f969c27f8ecdac087a4
PR c++/89214 - ICE when initializing aggregates with bases.

* typeck2.c (digest_init_r): Warn about object slicing instead of
crashing.

* g++.dg/cpp1z/aggr-base8.C: New test.
* g++.dg/cpp1z/aggr-base9.C: New test.

From-SVN: r269919
gcc/cp/ChangeLog
gcc/cp/typeck2.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1z/aggr-base8.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1z/aggr-base9.C [new file with mode: 0644]