[PR c++/84593] ice on braced init with uninit ref field
authorAlexandre Oliva <aoliva@redhat.com>
Tue, 6 Mar 2018 06:24:53 +0000 (06:24 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Tue, 6 Mar 2018 06:24:53 +0000 (06:24 +0000)
commit2e1a7ecb2d8f1ee3f88fd2906ab16eb30ab525f7
tree5cd37847dde8ab2a0d1d2c4aa83f054104f46fc4
parent1ea71a82f9d42684c542147b231afb63e8a6da8f
[PR c++/84593] ice on braced init with uninit ref field

If an initializer expr is to be NULL in a ctor initializer list, we
ICE in picflag_from_initializer and elsewhere.

If we're missing an initializer for a reference field, we report the
error, but then build a zero initializer to avoid the ICE.

for  gcc/cp/ChangeLog

PR c++/84593
* init.c (build_zero_init_1): Zero-initialize references.

for  gcc/testsuite/ChangeLog

PR c++/84593
* g++.dg/cpp1y/pr84593.C: New.

From-SVN: r258270
gcc/cp/ChangeLog
gcc/cp/init.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1y/pr84593.C [new file with mode: 0644]