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

            Bug ID: 98611
           Summary: [concepts] internal compiler error: in
                    get_underlying_template, at cp/pt.c:6494
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bjornsundin02 at gmail dot com
  Target Milestone: ---

Created attachment 49924
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49924&action=edit
Preprocessed minimal C++20 code that crashes the compiler

I created a 23 lines long piece of code that uses C++20 concepts with no
includes that crashes the compiler. Below is the full output of the command
"gcc -v -save-temps -std=c++20 minimal.cpp". I did however try this on
godbolt.org, both with trunk and 10.2.0 versions and it crashed the compiler as
well, so most of this information is probably not needed anyways. Compiler
explorer link: https://godbolt.org/z/eqdzoc

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=c:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/10.2.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../configure
--prefix=/d/Prog/winlibs64-10.2.0/home/inst_gcc-10.2.0/share/gcc
--build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32
--with-pkgversion='MinGW-W64 x86_64-posix-seh, built by Brecht Sanders'
--with-tune=generic --enable-checking=release --enable-threads=posix
--disable-sjlj-exceptions --disable-libunwind-exceptions
--enable-serial-configure --disable-bootstrap --enable-host-shared
--enable-plugin --enable-default-ssp --disable-rpath --disable-libstdcxx-pch
--enable-libstdcxx-time=yes --disable-libstdcxx-debug
--disable-version-specific-runtime-libs --with-stabs --disable-symvers
--enable-languages=c,c++,fortran,lto,objc,obj-c++,d --disable-gold
--disable-nls --disable-stage1-checking --disable-win32-registry
--disable-multilib --enable-ld --enable-libquadmath --enable-libada
--enable-libssp --enable-libstdcxx --enable-lto --enable-fully-dynamic-string
--enable-libgomp --enable-graphite --enable-mingw-wildcard 
--with-mpc=/d/Prog/winlibs64-10.2.0/custombuilt
--with-mpfr=/d/Prog/winlibs64-10.2.0/custombuilt
--with-gmp=/d/Prog/winlibs64-10.2.0/custombuilt
--with-isl=/d/Prog/winlibs64-10.2.0/custombuilt --enable-install-libiberty
--enable-__cxa_atexit --without-included-gettext --with-diagnostics-color=auto
--with-libiconv --with-system-zlib
--with-build-sysroot=/d/Prog/winlibs64-10.2.0/home/gcc-10.2.0/build_mingw/mingw-w64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.0 (MinGW-W64 x86_64-posix-seh, built by Brecht Sanders)
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++2a' '-mtune=generic'
'-march=x86-64'
 c:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/10.2.0/cc1plus.exe -E -quiet
-v -iprefix c:\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/10.2.0/ -D_REENTRANT
minimal.cpp -mtune=generic -march=x86-64 -std=c++2a -fpch-preprocess -o
minimal.ii
ignoring duplicate directory
"c:/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../include/c++/10.2.0"
ignoring duplicate directory
"c:/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../include/c++/10.2.0/x86_64-w64-mingw32"
ignoring duplicate directory
"c:/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../include/c++/10.2.0/backward"
ignoring duplicate directory
"c:/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/10.2.0/include"
ignoring nonexistent directory
"D:/Prog/winlibs64-10.2.0/home/inst_gcc-10.2.0/share/gcc/include"
ignoring nonexistent directory
"/d/Prog/winlibs64-10.2.0/home/inst_gcc-10.2.0/share/gcc/include"
ignoring duplicate directory
"c:/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/10.2.0/include-fixed"
ignoring duplicate directory
"c:/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/include"
ignoring nonexistent directory "/mingw/include"
#include "..." search starts here:
#include <...> search starts here:

c:\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../include/c++/10.2.0

c:\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../include/c++/10.2.0/x86_64-w64-mingw32

c:\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../include/c++/10.2.0/backward
 c:\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/10.2.0/include
 c:\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../include
 c:\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/10.2.0/include-fixed

c:\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++2a' '-mtune=generic'
'-march=x86-64'
 c:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/10.2.0/cc1plus.exe
-fpreprocessed minimal.ii -quiet -dumpbase minimal.cpp -mtune=generic
-march=x86-64 -auxbase minimal -std=c++2a -version -o minimal.s
GNU C++17 (MinGW-W64 x86_64-posix-seh, built by Brecht Sanders) version 10.2.0
(x86_64-w64-mingw32)
        compiled by GNU C version 10.2.0, GMP version 6.2.0, MPFR version
4.0.2, MPC version 1.1.0, isl version isl-0.22.1-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++17 (MinGW-W64 x86_64-posix-seh, built by Brecht Sanders) version 10.2.0
(x86_64-w64-mingw32)
        compiled by GNU C version 10.2.0, GMP version 6.2.0, MPFR version
4.0.2, MPC version 1.1.0, isl version isl-0.22.1-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 0faeb1ddadd8f43fea33747988e615bd
minimal.cpp: In function 'int main()':
minimal.cpp:15:4: internal compiler error: in get_underlying_template, at
cp/pt.c:6494
   15 |  { _Class{object} } -> IsSame<T>;
      |  ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.

Reply via email to