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

--- Comment #17 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:c65bd532e225996cc9c5b75355d2cb648d0bcfc5

commit r12-7744-gc65bd532e225996cc9c5b75355d2cb648d0bcfc5
Author: Jason Merrill <ja...@redhat.com>
Date:   Mon Mar 21 17:48:01 2022 -0400

    c++: initialized array of vla [PR58646]

    We went into build_vec_init because we're dealing with a VLA, but then
    build_vec_init thought it was safe to just build an INIT_EXPR because the
    outer dimension is constant.  Nope.

            PR c++/58646

    gcc/cp/ChangeLog:

            * init.cc (build_vec_init): Check for vla element type.

    gcc/testsuite/ChangeLog:

            * g++.dg/ext/vla24.C: New test.

Reply via email to