https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109468

            Bug ID: 109468
           Summary: assign to default with three way comparison
           Product: gcc
           Version: 12.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: stevenxia990430 at gmail dot com
  Target Milestone: ---

The following program reports an internal compiler error: Segmentation fault

To quickly reproduce: https://gcc.godbolt.org/z/M5oPs7eor
```
#include <iostream>
enum class Color { Red, Green, Blue };
auto operator<=>(Color lhs, Color rhs) = default;
int main() {
    return 0;
}
```

It seems that assigning to default causes the issue as changing the assignment
to 0 removes the internal compiler error.
  • [Bug c++/109468] New: assign... stevenxia990430 at gmail dot com via Gcc-bugs

Reply via email to