[Bug c++/99429] New: ICE for bool return from <=>

msharov at users dot sourceforge.net gcc-bugzilla@gcc.gnu.org
Sat Mar 6 14:51:08 GMT 2021


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

            Bug ID: 99429
           Summary: ICE for bool return from <=>
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: msharov at users dot sourceforge.net
  Target Milestone: ---

Created attachment 50315
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50315&action=edit
std::strong_ordering and incorrect duration code

When erronously declaring <=> to return bool, g++ crashes:

> g++ -c -std=c++20 chrono.cc
chrono.cc: In instantiation of ‘class duration<1>’:
chrono.cc:44:42:   required from here
chrono.cc:38:20: internal compiler error: Segmentation fault
   38 |     constexpr bool operator<=> (const duration& d) const = default;
      |                    ^~~~~~~~


More information about the Gcc-bugs mailing list