[Bug c++/99831] ICE: in reshape_init, at cp/decl.c:6720

2021-03-30 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
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

[Bug c++/99831] ICE: in reshape_init, at cp/decl.c:6720

2021-03-30 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
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

[Bug c++/99831] ICE: in reshape_init, at cp/decl.c:6720

2021-03-30 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
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.

[Bug c++/99831] ICE: in reshape_init, at cp/decl.c:6720

2021-03-30 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
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

[Bug c++/99831] ICE: in reshape_init, at cp/decl.c:6720

2021-03-30 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99831 Marek Polacek changed: What|Removed |Added Keywords|needs-reduction | --- Comment #5 from Marek Polacek ---

[Bug c++/99831] ICE: in reshape_init, at cp/decl.c:6720

2021-03-30 Thread hewillk at gmail dot com via Gcc-bugs
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

[Bug c++/99831] ICE: in reshape_init, at cp/decl.c:6720

2021-03-30 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99831 Marek Polacek changed: What|Removed |Added Keywords||needs-reduction --- Comment #3 from Mare

[Bug c++/99831] ICE: in reshape_init, at cp/decl.c:6720

2021-03-30 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99831 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org Ke

[Bug c++/99831] ICE: in reshape_init, at cp/decl.c:6720

2021-03-30 Thread hewillk at gmail dot com via Gcc-bugs
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.