[Bug c++/63707] Brace initialization of array sometimes fails if no copy constructor
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jan 15 18:39:03 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63707
--- Comment #17 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:
https://gcc.gnu.org/g:cd09079cfd50d289cbb05eadb728a0713f6bae8a
commit r11-6733-gcd09079cfd50d289cbb05eadb728a0713f6bae8a
Author: Jason Merrill <jason@redhat.com>
Date: Fri Jan 15 11:42:00 2021 -0500
c++: Fix list-init of array of no-copy type [PR63707]
build_vec_init_elt models initialization from some arbitrary object of the
type, i.e. copy, but in the case of list-initialization we don't do a copy
from the elements, we initialize them directly.
gcc/cp/ChangeLog:
PR c++/63707
* tree.c (build_vec_init_expr): Don't call build_vec_init_elt
if we got a CONSTRUCTOR.
gcc/testsuite/ChangeLog:
PR c++/63707
* g++.dg/cpp0x/initlist-array13.C: New test.
More information about the Gcc-bugs
mailing list