diff options
author | Jason Merrill <jason@redhat.com> | 2021-11-11 22:03:53 -0500 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2021-11-15 02:49:51 -0500 |
commit | bd95d75f3412e1a7debab7c6c602ba409f274eb5 (patch) | |
tree | 863b4a8caeabd36dc1542a590976dd45fedc453b /gcc/cp/lambda.c | |
parent | 4df7f8c79835d56928f51f9e674d326300936e8e (diff) | |
download | gcc-bd95d75f3412e1a7debab7c6c602ba409f274eb5.zip gcc-bd95d75f3412e1a7debab7c6c602ba409f274eb5.tar.gz gcc-bd95d75f3412e1a7debab7c6c602ba409f274eb5.tar.bz2 |
c++: c++20 constexpr default ctor and array init
The implicit constexpr patch revealed that marking the constructor in the
PR70690 testcase as constexpr made the bug reappear, because build_vec_init
assumed that a constexpr default constructor initialized the whole object,
so it was equivalent to value-initialization. But this is no longer true in
C++20.
PR c++/70690
gcc/cp/ChangeLog:
* init.c (build_vec_init): Check default_init_uninitialized_part in
C++20.
gcc/testsuite/ChangeLog:
* g++.dg/init/array41a.C: New test.
Diffstat (limited to 'gcc/cp/lambda.c')
0 files changed, 0 insertions, 0 deletions