PR c++/88380 - wrong-code with flexible array and NSDMI.
authorJason Merrill <jason@redhat.com>
Wed, 20 Feb 2019 18:54:45 +0000 (13:54 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 20 Feb 2019 18:54:45 +0000 (13:54 -0500)
commite0737c209bb0a1075201d22d89baa1575c44d153
treedd75208166f9718dcc53c90f0a861e6e10669c86
parentcb13308543771f56bbc932933b9ec7bbb95d37ac
PR c++/88380 - wrong-code with flexible array and NSDMI.

Here 'skipped' was set to -1 to force an explicit initializer for 'uninit'
before the initializer for 'initialized', and so we also tried to emit an
explicit initializer for the flexible array, for which build_zero_init
returns error_mark_node.  We should ignore flexarrays even when
skipped < 0.

* typeck2.c (process_init_constructor_record): Skip flexarrays.

From-SVN: r269046
gcc/cp/ChangeLog
gcc/cp/typeck2.c
gcc/testsuite/g++.dg/ext/flexary33.C [new file with mode: 0644]