Skip to content
Snippets Groups Projects
Commit bd95d75f authored by Jason Merrill's avatar Jason Merrill
Browse files

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.
parent 4df7f8c7
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment