https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93989
--- Comment #8 from Jonathan Wakely ---
Further reduced:
struct bstring
{
char buf {};
char* ptr = buf;
};
void test01()
{
constexpr bstring v1{};
}
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93989
Jonathan Wakely changed:
What|Removed |Added
Keywords||diagnostic
--- Comment #7 from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93989
--- Comment #6 from Jonathan Wakely ---
This works fine, i.e. just remove the constexpr specifiers on the local
variables:
consteval void test01()
{
typedef constexpr_allocator alloc_type;
typedef bstring test_type;
alloc_type a1(1);
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93989
--- Comment #5 from Michael de Lang ---
Created attachment 47953
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47953=edit
self-contained minimal test case
I managed to reduce the test case to a single file, which also produces the two
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93989
Richard Biener changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93989
--- Comment #3 from Marek Polacek ---
Unfortunately that generates literally hundreds of errors when compiled with
-std=c++20 so it's nearly impossible for me to analyze it and see if there's a
real problem.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93989
--- Comment #2 from Michael de Lang ---
Created attachment 47943
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47943=edit
save-temps copy_assign_constexpr.ii
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93989
Marek Polacek changed:
What|Removed |Added
CC||mpolacek at gcc dot gnu.org
--- Comment