https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99831
--- Comment #8 from Marek Polacek ---
The problem is that post-r277865 in defaulted_late_check we call
synthesize_method here:
if (kind == sfk_comparison)
{
/* If the function was declared constexpr, check that the definition
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99831
Marek Polacek changed:
What|Removed |Added
Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot
gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99831
--- Comment #7 from Marek Polacek ---
There was en error + ICE, but since r11-5752 we only have the ICE.
Looks like the ICE started with r277865.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99831
--- Comment #6 from Marek Polacek ---
Even shorter:
// PR c++/99831
template struct S {
constexpr S(const char (&str)[N]) : value{} { }
char value[N];
};
template struct string {
constexpr bool operator==(const string &) const = default
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99831
Marek Polacek changed:
What|Removed |Added
Keywords|needs-reduction |
--- Comment #5 from Marek Polacek ---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99831
--- Comment #4 from 康桓瑋 ---
When the array subscript is outside the bounds of array, gcc seems to fall into
infinite recursion due to the default operator==.
Here is the reduced with no header:
struct A {
constexpr A(const char*) {}
char va
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99831
Marek Polacek changed:
What|Removed |Added
Keywords||needs-reduction
--- Comment #3 from Mare
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99831
Marek Polacek changed:
What|Removed |Added
CC||mpolacek at gcc dot gnu.org
Ke
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99831
--- Comment #1 from 康桓瑋 ---
Note that if we comment one of the asserts, there will be no problem, or we
just comment the redundant std::ranges::sort.