https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93064
Bug ID: 93064 Summary: ICE on C++20 operator<=> use Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jengelh at inai dot de Target Milestone: --- » cat x.cpp #include <memory> #include <cstdio> struct D { D() { printf("*D\n"); } ~D() { printf("~D\n"); } auto operator<=>(const D &) = default; }; int main() { D d; d <=> d; } » g++-10 -v x.cpp -std=c++2a Using built-in specs. COLLECT_GCC=g++-10 COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/10/lto-wrapper OFFLOAD_TARGET_NAMES=hsa:nvptx-none Target: x86_64-suse-linux Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,ada,go,d --enable-offload-targets=hsa,nvptx-none=/usr/nvptx-none, --without-cuda-driver --disable-werror --with-gxx-include-dir=/usr/include/c++/10 --enable-ssp --disable-libssp --disable-libvtv --disable-cet --disable-libcc1 --enable-plugin --with-bugurl=https://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --with-slibdir=/lib64 --with-system-zlib --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-libphobos --enable-version-specific-runtime-libs --with-gcc-major-version-only --enable-linker-build-id --enable-linux-futex --enable-gnu-indirect-function --program-suffix=-10 --without-system-libunwind --enable-multilib --with-arch-32=x86-64 --with-tune=generic --with-build-config=bootstrap-lto-lean --enable-link-mutex --build=x86_64-suse-linux --host=x86_64-suse-linux Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 10.0.0 20191210 (experimental) (SUSE Linux) COLLECT_GCC_OPTIONS='-v' '-std=c++2a' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /usr/lib64/gcc/x86_64-suse-linux/10/cc1plus -quiet -v -D_GNU_SOURCE x.cpp -quiet -dumpbase x.cpp -mtune=generic -march=x86-64 -auxbase x -std=c++2a -version -o /tmp/ccBzGUTo.s GNU C++17 (SUSE Linux) version 10.0.0 20191210 (experimental) (x86_64-suse-linux) compiled by GNU C version 10.0.0 20191210 (experimental), GMP version 6.1.2, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.20-GMP GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 #include "..." search starts here: #include <...> search starts here: /usr/include/c++/10 /usr/include/c++/10/x86_64-suse-linux /usr/include/c++/10/backward /usr/lib64/gcc/x86_64-suse-linux/10/include /usr/local/include /usr/lib64/gcc/x86_64-suse-linux/10/include-fixed /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/include /usr/include End of search list. GNU C++17 (SUSE Linux) version 10.0.0 20191210 (experimental) (x86_64-suse-linux) compiled by GNU C version 10.0.0 20191210 (experimental), GMP version 6.1.2, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.20-GMP GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Compiler executable checksum: 17fc461878f813b85b050d0380f89fc7 x.cpp:6:7: error: defaulted ‘auto D::operator<=>(const D&)’ must be ‘const’ 6 | auto operator<=>(const D &) = default; | ^~~~~~~~ x.cpp: In member function ‘constexpr auto D::operator<=>(const D&)’: x.cpp:6:7: internal compiler error: Segmentation fault 0x7fa3e9f2a14f ??? /usr/src/debug/glibc-2.30-2.1.x86_64/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0 0x7fa3e9f14e0a __libc_start_main ../csu/libc-start.c:308 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://bugs.opensuse.org/> for instructions.