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

            Bug ID: 111363
           Summary: internal compiler error when mistype type of
                    operator<=>
           Product: gcc
           Version: 9.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sergei at tsaplin dot ru
  Target Milestone: ---

Created attachment 55872
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55872&action=edit
archive with 4 file described in the end of comment

mistyped: 
"B operator<=>(const B &) const = default;" 
instead of:
"auto operator<=>(const B &) const = default;"

Got following error on compilation:

kk.cpp:20:20:   required from here
kk.cpp:15:5: internal compiler error: in finish_expr_stmt, at
cp/semantics.c:682
   15 |   B operator<=>(const B &) const = default;
      |     ^~~~~~~~
0x7f1c30f45082 __libc_start_main
        ../csu/libc-start.c:308

Error is reproduced when struct B has other struct A as a member and A has
std::array as a member.

gcc version: 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2)
exec command:  g++ -std=c++20 kk.cpp -save-temps -v &> compiler_output.txt

In attachements:
gcc_v_output.txt: full output of "gcc -v"
compiler_output.txt: output of exec command "g++ ..."
kk.ii: file produced by -save-temps
kk.cpp: single file with source code

Reply via email to