https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88380

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Wed Feb 20 18:54:45 2019
New Revision: 269046

URL: https://gcc.gnu.org/viewcvs?rev=269046&root=gcc&view=rev
Log:
        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.

Added:
    trunk/gcc/testsuite/g++.dg/ext/flexary33.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/typeck2.c

Reply via email to