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

            Bug ID: 100248
           Summary: ICE with global "default" keyword
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hewillk at gmail dot com
  Target Milestone: ---

10.2, 10.3, 11 and 12 regression:

https://godbolt.org/z/qrvE98Taa

#include <compare>

struct S {};
auto operator<=>(S&&, S&&) = default;

<source>:4:30: internal compiler error: Segmentation fault
    4 | auto operator<=>(S&&, S&&) = default;
      |                              ^~~~~~~
0x1cff079 internal_error(char const*, ...)
        ???:0
0x1366c60 strip_array_types(tree_node*)
        ???:0
0x9c97d8 cp_type_quals(tree_node const*)
        ???:0
0x9ba523 cp_build_qualified_type_real(tree_node*, int, int)
        ???:0
0x82f194 defaultable_fn_check(tree_node*)
        ???:0
0x7b2cc8 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
        ???:0
0x8e1f3d c_parse_file()
        ???:0
0xa62212 c_common_parse_file()
        ???:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.

Reply via email to