https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93320
vopl at bk dot ru changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vopl at bk dot ru --- Comment #7 from vopl at bk dot ru --- Very similar ICE here. Affected versions are 9 and 10 but not 11. The problem take place only with -g option supplied $cat b11.cpp && echo EOFFFFFF template <class=void> struct Generic { template <class=void> using Api = decltype([](){}); }; template <class T> struct Def { using Api = Generic<T>::template Api<>; }; Def<int> d; EOFFFFFF $ g++ -v -g -std=c++20 b11.cpp Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/10.2.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-10.2.0-r5/work/gcc-10.2.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.2.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/10.2.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/10.2.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/10.2.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include/g++-v10 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/10.2.0/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --disable-nls --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 10.2.0-r5 p6' --disable-esp --enable-libstdcxx-time --with-build-config=bootstrap-lto --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 --enable-systemtap --enable-vtable-verify --with-zstd --enable-lto --with-isl --disable-isl-version-check --enable-default-pie --disable-default-ssp Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 10.2.0 (Gentoo 10.2.0-r5 p6) COLLECT_GCC_OPTIONS='-v' '-g' '-std=c++2a' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /usr/libexec/gcc/x86_64-pc-linux-gnu/10.2.0/cc1plus -quiet -v -D_GNU_SOURCE b11.cpp -quiet -dumpbase b11.cpp -mtune=generic -march=x86-64 -auxbase b11 -g -std=c++2a -version -o /tmp/ccSzE9Pi.s GNU C++17 (Gentoo 10.2.0-r5 p6) version 10.2.0 (x86_64-pc-linux-gnu) compiled by GNU C version 10.2.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.23-GMP GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 ignoring nonexistent directory "/usr/local/include" ignoring nonexistent directory "/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include/g++-v10 /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include/g++-v10/x86_64-pc-linux-gnu /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include/g++-v10/backward /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include-fixed /usr/include End of search list. GNU C++17 (Gentoo 10.2.0-r5 p6) version 10.2.0 (x86_64-pc-linux-gnu) compiled by GNU C version 10.2.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.23-GMP GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 109a96b688365221cca69113b161e683 b11.cpp: In instantiation of 'struct Def<int>': b11.cpp:15:10: required from here b11.cpp:9:8: internal compiler error: in is_base_type, at dwarf2out.c:12994 9 | struct Def | ^~~ 0x5f1460 is_base_type /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/dwarf2out.c:12994 0x5f1460 is_base_type /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/dwarf2out.c:12964 0xe773ec modified_type_die /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/dwarf2out.c:13432 0xe76ce3 add_type_attribute /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/dwarf2out.c:21587 0xe71356 gen_typedef_die /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/dwarf2out.c:25406 0xe70e8a gen_decl_die /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/dwarf2out.c:26364 0xe8ce3c gen_member_die /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/dwarf2out.c:25183 0xe8ce3c gen_struct_or_union_type_die /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/dwarf2out.c:25279 0xe8ce3c gen_tagged_type_die /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/dwarf2out.c:25480 0xe7383d gen_type_die_with_usage /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/dwarf2out.c:25675 0xe731c6 gen_type_die /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/dwarf2out.c:25729 0xe70a87 gen_decl_die /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/dwarf2out.c:26361 0xe27a00 dwarf2out_decl /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/dwarf2out.c:26909 0xe89587 dwarf2out_type_decl /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/dwarf2out.c:26634 0xe89587 rest_of_type_compilation(tree_node*, int) /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/passes.c:339 0xf451c3 finish_struct_1(tree_node*) /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/class.c:7506 0x1092c5e instantiate_class_template_1 /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/pt.c:12081 0xe2ef20 instantiate_class_template(tree_node*) /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/pt.c:12120 0xe2ef20 complete_type(tree_node*) /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/typeck.c:137 0xe2ef20 complete_type(tree_node*) /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/typeck.c:111 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.