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

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

https://gcc.gnu.org/g:09d0fc6912c4f600432caecc6ab0a277f2aef480

commit r11-9679-g09d0fc6912c4f600432caecc6ab0a277f2aef480
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.c (build_vec_init): Check for vla element type.

    gcc/testsuite/ChangeLog:

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

Reply via email to