https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102234
Bug ID: 102234 Summary: internal compiler error: in type_memfn_rqual, at cp/typeck.c:10389 Product: gcc Version: 10.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: sin-ack at protonmail dot com Target Milestone: --- Created attachment 51423 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51423&action=edit Test case for bug Seems to be similar to a few other bugs that relate to two destructor options constrained by concepts. The test case as reduced by cvise is: ======== template <typename> constexpr bool IsDestructible{}; template <typename T> constexpr bool IsTriviallyDestructible = IsDestructible<T>; template <typename T> class Optional { ~Optional() requires(!IsDestructible<T>); ~Optional() requires(!IsTriviallyDestructible<T>); }; template <typename, typename ErrorT> class Result { using ErrorType = ErrorT; Optional<ErrorType> m_error; }; class SocketError class UDPSocket { Result<UDPSocket, SocketError> u16ResultUDPSocketSocketError ======== Output of g++ -v -save-temps -std=c++20 testcase.i is: ======== Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/10.3.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-10.3.0-r2/work/gcc-10.3.0/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/10.3.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/10.3.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/10.3.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/10.3.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/include/g++-v10 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/10.3.0/python --enable-languages=c,c++,jit,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --disable-libunwind-exceptions --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 10.3.0-r2 p3' --disable-esp --enable-libstdcxx-time --enable-host-shared --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-fixed-point --enable-targets=all --enable-libgomp --disable-libssp --disable-libada --disable-systemtap --disable-vtable-verify --disable-libvtv --without-zstd --enable-lto --without-isl --enable-default-pie --enable-default-ssp Thread model: posix Supported LTO compression algorithms: zlib gcc version 10.3.0 (Gentoo 10.3.0-r2 p3) COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++2a' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /usr/libexec/gcc/x86_64-pc-linux-gnu/10.3.0/cc1plus -fpreprocessed testcase.i -quiet -dumpbase testcase.i -mtune=generic -march=x86-64 -auxbase testcase -std=c++2a -version -o testcase.s GNU C++17 (Gentoo 10.3.0-r2 p3) version 10.3.0 (x86_64-pc-linux-gnu) compiled by GNU C version 10.3.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version none GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 GNU C++17 (Gentoo 10.3.0-r2 p3) version 10.3.0 (x86_64-pc-linux-gnu) compiled by GNU C version 10.3.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version none GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 7e5a4e9d9d860088f9be6ac2d50a5e79 testcase.i: In instantiation of ‘class Optional<SocketError>’: testcase.i:10:23: required from ‘class Result<UDPSocket, SocketError>’ testcase.i:13:34: required from here testcase.i:4:29: internal compiler error: in type_memfn_rqual, at cp/typeck.c:10389 4 | template <typename T> class Optional { | ^~~~~~~~ 0x7f2345cf780c __libc_start_main ../csu/libc-start.c:332 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://bugs.gentoo.org/> for instructions. ========