[Bug c++/115657] New: [15 regression] ICE in tsubst_enum/tsubst_expr during template instantiation
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115657 Bug ID: 115657 Summary: [15 regression] ICE in tsubst_enum/tsubst_expr during template instantiation Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vopl at bk dot ru Target Milestone: --- $ cat ./ice-15.cpp && echo EOFF struct NonIntegral { constexpr operator int() { return 0; } }; template struct TemplatedStructural { enum { e = NonIntegral{} }; }; template struct TemplatedStructural; EOFF $ g++-15 -v -c ./ice-15.cpp Using built-in specs. COLLECT_GCC=g++-15 Target: x86_64-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-15.0./work/gcc-15.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/15 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/15/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/15 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/15/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/15/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15 --disable-silent-rules --disable-dependency-tracking --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/15/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --disable-nls --disable-libunwind-exceptions --enable-checking=yes,extra --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 15.0. p, commit 772589fa2b38f09c2f62743d906e12875492d9e0' --with-gcc-major-version-only --enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch --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-cet --enable-systemtap --disable-valgrind-annotations --enable-vtable-verify --with-zstd --with-isl --disable-isl-version-check --enable-default-pie --enable-host-pie --enable-host-bind-now --disable-default-ssp --disable-fixincludes --with-build-config='bootstrap-lto bootstrap-cet' Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 15.0.0 20240610 (experimental) eb316013a7c841094577a57407f605b5a7ca5eee (Gentoo 15.0. p, commit 772589fa2b38f09c2f62743d906e12875492d9e0) COLLECT_GCC_OPTIONS='-v' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /usr/libexec/gcc/x86_64-pc-linux-gnu/15/cc1plus -quiet -v -D_GNU_SOURCE ./ice-15.cpp -quiet -dumpbase ice-15.cpp -dumpbase-ext .cpp -mtune=generic -march=x86-64 -version -fcf-protection -o /tmp/cchq8U8U.s GNU C++17 (Gentoo 15.0. p, commit 772589fa2b38f09c2f62743d906e12875492d9e0) version 15.0.0 20240610 (experimental) eb316013a7c841094577a57407f605b5a7ca5eee (x86_64-pc-linux-gnu) compiled by GNU C version 15.0.0 20240610 (experimental) eb316013a7c841094577a57407f605b5a7ca5eee, GMP version 6.3.0, MPFR version 4.2.1, MPC version 1.3.1, isl version isl-0.26-GMP GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 ignoring nonexistent directory "/usr/local/include" ignoring nonexistent directory "/usr/lib/gcc/x86_64-pc-linux-gnu/15/include-fixed" ignoring nonexistent directory "/usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15 /usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/x86_64-pc-linux-gnu /usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/backward /usr/lib/gcc/x86_64-pc-linux-gnu/15/include /usr/include End of search list. Compiler executable checksum: c29e8810e60ad9d4d5598df79d33bb1a ./ice-15.cpp: In instantiation of 'struct TemplatedStructural': ./ice-15.cpp:11:17: required from here 11 | template struct TemplatedStructural; | ^ ./ice-15.cpp:8:10: internal compiler error: in tsubst_expr, at cp/pt.cc:21872 8 | enum { e = NonIntegral{} }; | ^ 0x5605c612fdac tsubst_expr(tree_node*, tree_node*, int, tree_node*) /usr/src/debug/sys-devel/gcc-15.0./gcc-15.0./gcc/cp/pt.cc:21872 0x5605c725d18c tsubst_enum /usr/src/debug/sys-devel/gcc-15.0./gcc-15.0./gcc/cp/pt.cc:27727 0x5605c725d18c lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*, int) /usr/src/debug/sys-devel/gcc-15.0./gcc-15.0./gcc/cp/pt.cc:10498 0x5605c7265a9b tsubst(tree_node*, tree_node*, int, tree_node*) /usr/src/debug/sys-devel/gcc-15.0./gcc-15.0./gcc/cp/pt.cc:16267 0x5605c733badf tsubst_decl /usr/src/debug/sys-devel/gcc-15.0./gcc-15.0./gcc/cp/pt.cc:15437 0x5605c738a042
[Bug c++/115232] New: [14 regression] ICE during GIMPLE pass
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115232 Bug ID: 115232 Summary: [14 regression] ICE during GIMPLE pass Product: gcc Version: 14.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vopl at bk dot ru Target Milestone: --- $ cat ./ice-14.cpp && echo EOF // g++-14 -std=c++20 -v -c ./ice-14.cpp /0/1/2/3/4/5/6/7 template struct Outer { Outer(); template static constexpr bool staticTemplatedConstant = true; template void method() requires staticTemplatedConstant { struct Inner { static void* operator new(unsigned long /*sz*/) {return new char;} static void operator delete(void*) {} Outer _outerInstance; }; new Inner; } }; /0/1/2/3/4/5/6/7 void f() { Outer{}.method(); } EOF $ g++-14 -std=c++20 -v -c ./ice-14.cpp Using built-in specs. COLLECT_GCC=g++-14 Target: x86_64-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/gcc-14-20240518/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/14 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/14/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14 --disable-silent-rules --disable-dependency-tracking --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/14/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --disable-nls --disable-libunwind-exceptions --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 14.1.1_p20240518 p1' --with-gcc-major-version-only --enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch --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-cet --enable-systemtap --disable-valgrind-annotations --enable-vtable-verify --with-zstd --with-isl --disable-isl-version-check --enable-default-pie --enable-host-pie --enable-host-bind-now --disable-default-ssp --disable-fixincludes --with-build-config='bootstrap-lto bootstrap-cet' Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 14.1.1 20240516 (Gentoo 14.1.1_p20240518 p1) COLLECT_GCC_OPTIONS='-std=c++20' '-v' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /usr/libexec/gcc/x86_64-pc-linux-gnu/14/cc1plus -quiet -v -D_GNU_SOURCE ./ice-14.cpp -quiet -dumpbase ice-14.cpp -dumpbase-ext .cpp -mtune=generic -march=x86-64 -std=c++20 -version -fcf-protection -o /tmp/cc0hiSMi.s GNU C++20 (Gentoo 14.1.1_p20240518 p1) version 14.1.1 20240516 (x86_64-pc-linux-gnu) compiled by GNU C version 14.1.1 20240516, GMP version 6.3.0, MPFR version 4.2.1, MPC version 1.3.1, isl version isl-0.26-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/14/include-fixed" ignoring nonexistent directory "/usr/lib/gcc/x86_64-pc-linux-gnu/14/../../../../x86_64-pc-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14 /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/x86_64-pc-linux-gnu /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/backward /usr/lib/gcc/x86_64-pc-linux-gnu/14/include /usr/include End of search list. Compiler executable checksum: b63801264392b36e05179a0f762d8604 during GIMPLE pass: waccess ./ice-14.cpp: In member function 'void Outer::method() requires staticTemplatedConstant [with U = void; T = void]': ./ice-14.cpp:12:29: internal compiler error: Segmentation fault 12 | template void method() requires staticTemplatedConstant | ^~ 0x55af8dca912c crash_signal /usr/src/debug/sys-devel/gcc-14.1.1_p20240518/gcc-14-20240518/gcc/toplev.cc:319 0x55af8dbea562 new_delete_mismatch_p /usr/src/debug/sys-devel/gcc-14.1.1_p20240518/gcc-14-20240518/gcc/gimple-ssa-warn-access.cc:1627 0x55af8d7e15d5 new_delete_mismatch_p /usr/src/debug/sys-devel/gcc-14.1.1_p20240518/gcc-14-20240518/gcc/gimple-ssa-warn-access.cc:1765 0x55af8d7e15d5 matching_alloc_calls_p /usr/src/debug/sys-devel/gcc-14.1.1_p20240518/gcc-14-20240518/gcc/gimple-ssa-warn-access.cc:1788 0x55af8e48fcdb matching_alloc_calls_p
[Bug c++/101222] New: unwanted templated constructor instantiation due to wrong binary operator access
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101222 Bug ID: 101222 Summary: unwanted templated constructor instantiation due to wrong binary operator access Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vopl at bk dot ru Target Milestone: --- cat main.cpp && echo EOFF template struct Trap {}; struct Some { template)> Some(T) {}// Trap for T - only for check if Some was instantiated }; void operator<(const Some&, const Some&);//wrong instantiatoion of Some::Some here enum E{}; int main() { bool b = E{} < E{};// wrong access to "bool operator<(const Some&, const Some&);" return 0; } template <> struct Trap {};// now check Trap for E EOFF $ g++ -c main.cpp main.cpp:17:20: error: specialization of 'Trap' after instantiation 17 | template <> struct Trap {};// now check Trap for E |^~~ main.cpp:17:20: error: redefinition of 'struct Trap' main.cpp:1:29: note: previous definition of 'struct Trap' 1 | template struct Trap {}; | ^~~~ - In these code "void operator<(const Some&, const Some&)" is not a candidate for overloading for "E{} < E{}", so, it must not be used at all, and as a result, Some::Some must not be instantiated. All gcc versions with c++11 standard are affected. Clang and msvc are okay.
[Bug c++/100825] function signature constraints are not a part of mangled name
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100825 --- Comment #6 from vopl at bk dot ru --- (In reply to Jonathan Wakely from comment #5) > Yes, I realise that, but I think that is the same rule that means you can't > change the result of overload resolution for a given call, But I have a precedent: void foo(char) {} void useFirst() { foo(0); // "void foo(char)" used, no "void foo(int)" visible at now } void foo(int) {} // introduce second function void useSecond() { foo(0); // "void foo(int)" selected as more suitable } > which is why the > second definition gets emitted using the same symbol name as the first. [defns.signature.templ] states that trailing require-clause is a part of function signature, so these are two different functions: template void foo() {} template void foo() requires true {} Since the signature is the basis for name mangling - different names are expected for different functions.. > If the constrained overload is declared before the first call to foo() > then there is no error. Aha, in such situation there is an only call, no second one, so, no second symbol and no conflicts. Thanks.
[Bug c++/100825] function signature constraints are not a part of mangled name
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100825 --- Comment #4 from vopl at bk dot ru --- (In reply to Jonathan Wakely from comment #3) > Clang and EDG agree with GCC here. > > I think your code is ill-formed due to [temp.constr.atomic] p3: > > "If, at different points in the program, the satisfaction result is > different for identical atomic constraints and template arguments, the > program is ill-formed, no diagnostic required." Please, take a look at [temp.constr.atomic] p2: Two atomic constraints, e1 and e2, are identical if they are formed from the same appearance of the same expression and... My code contains two functions (last case, from Comment#1): template void foo() /*empty constraints*/; template void foo() requires true; empty constraints from first functions is not identical "requires true" from second one, so, [temp.constr.atomic] p3 is not applicable here. Here is a sample with constraints in both functions: template concept C1 = sizeof(T) > 1; template concept C2 = C1 && sizeof(T) < 24; template void foo() requires C1 {} void useFirst() { foo(); } template void foo() requires C2 {} void useSecond() { foo(); } /tmp/ccZLqFRh.s:69: Error: symbol `_Z3fooIiEvv' is already defined Thanks.
[Bug c++/100825] function signature constraints are not a part of mangled name
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100825 --- Comment #2 from vopl at bk dot ru --- https://bugs.llvm.org/show_bug.cgi?id=50540
[Bug c++/100825] function signature constraints are not a part of mangled name
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100825 --- Comment #1 from vopl at bk dot ru --- a little more minimized: template void foo() {} //1 void useFirst() { foo();// call 1 - instantiate "void foo()" } template void foo() requires true {} //2 void useSecond() { foo();// call 2 - instantiate "void foo() requires true" } $ g++ -std=c++20 -c b.cpp /tmp/ccnRtmjt.s: Assembler messages: /tmp/ccnRtmjt.s:59: Error: symbol `_Z3fooIiEvv' is already defined
[Bug c++/100825] New: function signature constraints are not a part of mangled name
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100825 Bug ID: 100825 Summary: function signature constraints are not a part of mangled name Product: gcc Version: 11.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vopl at bk dot ru Target Milestone: --- $ cat b.cpp && echo EOFF template void foo() // 1 {} template void foo() requires (sizeof(char) == sizeof(T)) // 2 { foo();// call 1 - instantiate "void foo()" } template void foo() requires (sizeof(int) == sizeof(T)) // 3 {} void use() { foo(); // call 2 foo(); // call 3 - instantiate "void foo() requires (sizeof(int) == sizeof(T))" } // so, two different function instantiated with same mangled name EOFF $ g++ -std=c++20 -v -c b.cpp Using built-in specs. COLLECT_GCC=g++ 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='-std=c++2a' '-v' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /usr/libexec/gcc/x86_64-pc-linux-gnu/10.2.0/cc1plus -quiet -v -D_GNU_SOURCE b.cpp -quiet -dumpbase b.cpp -mtune=generic -march=x86-64 -auxbase b -std=c++2a -version -o /tmp/ccdHBZw0.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 COLLECT_GCC_OPTIONS='-std=c++2a' '-v' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/as -v --64 -o b.o /tmp/ccdHBZw0.s GNU assembler version 2.35.2 (x86_64-pc-linux-gnu) using BFD version (Gentoo 2.35.2 p1) 2.35.2 /tmp/ccdHBZw0.s: Assembler messages: /tmp/ccdHBZw0.s:61: Error: symbol `_Z3fooIiEvv' is already defined --- My expectations: mangled names must be different, because mangled name is based on the signature and a signature includes the requires-clause as a part
[Bug c++/100516] Unexpected -Wstringop-overread in deque initialization from empty initializer_list
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100516 --- Comment #2 from vopl at bk dot ru --- minimal reproduce code I have: using size_t = decltype(sizeof(char)); class initializer { const char* _array; size_t _len; public: constexpr initializer() : _array{}, _len{} { } constexpr const char* begin() const noexcept { return _array; } constexpr const char* end() const noexcept { return _array + _len; } }; /0/1/2/3/4/5/6/7 struct deque { char** _M_map; char** _M_start; char** _M_finish; template void _M_initialize_map(size_t); deque(initializer nil) { const char* first = nil.begin(); const char* last = nil.end(); _M_initialize_map(static_cast(last - first)); for (char** cur_node = _M_start; cur_node != _M_finish; ++cur_node) ++first; if (last != first) __builtin_memmove(*_M_finish, first, static_cast(last - first)); } }; template void deque::_M_initialize_map(size_t num_elements) { size_t num_nodes = (num_elements / size_t{2} + 1); _M_map = new char*[8]; char** nstart = _M_map + (size_t{8} - num_nodes) / 2; try { for (char** cur = nstart; cur == nstart; ++cur) *nstart = new char; } catch(...) { throw; } _M_start = _M_finish = nstart; } /0/1/2/3/4/5/6/7 int main() { deque{initializer{}}; return 0; }
[Bug c++/100516] Unexpected -Wstringop-overread in deque initialization from empty initializer_list
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100516 --- Comment #1 from vopl at bk dot ru --- Please look at the following code, it throws an unexpected warning [-Wstringop-overread]. $ cat b11.cpp && echo EOF #include void f() { std::initializer_list il{}; std::deque{il}; } EOF $ g++-11.1.0 -v -O2 -c b11.cpp Using built-in specs. COLLECT_GCC=g++-11.1.0 Target: x86_64-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-11.1.0/work/gcc-11.1.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/11.1.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/11.1.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/11.1.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/11.1.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/11.1.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 11.1.0 p1' --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 --disable-valgrind-annotations --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 11.1.0 (Gentoo 11.1.0 p1) COLLECT_GCC_OPTIONS='-v' '-O2' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /usr/libexec/gcc/x86_64-pc-linux-gnu/11.1.0/cc1plus -quiet -v -D_GNU_SOURCE ./b11.cpp -quiet -dumpbase b11.cpp -dumpbase-ext .cpp -mtune=generic -march=x86-64 -O2 -version -o /tmp/ccLiGLAe.s GNU C++17 (Gentoo 11.1.0 p1) version 11.1.0 (x86_64-pc-linux-gnu) compiled by GNU C version 11.1.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/11.1.0/../../../../x86_64-pc-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11 /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/x86_64-pc-linux-gnu /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/backward /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include-fixed /usr/include End of search list. GNU C++17 (Gentoo 11.1.0 p1) version 11.1.0 (x86_64-pc-linux-gnu) compiled by GNU C version 11.1.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: bf86c5c567158ff2074c3c886a72c867 In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/deque:60, from ./b11.cpp:1: In static member function 'static _Tp* std::__copy_move<_IsMove, true, std::random_access_iterator_tag>::__copy_m(const _Tp*, const _Tp*, _Tp*) [with _Tp = char; bool _IsMove = false]', inlined from '_OI std::__copy_move_a2(_II, _II, _OI) [with bool _IsMove = false; _II = const char*; _OI = char*]' at /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/bits/stl_algobase.h:495:30, inlined from '_OI std::__copy_move_a1(_II, _II, _OI) [with bool _IsMove = false; _II = const char*; _OI = char*]' at /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/bits/stl_algobase.h:522:42, inlined from '_OI std::__copy_move_a(_II, _II, _OI) [with bool _IsMove = false; _II = const char*; _OI = char*]' at /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/bits/stl_algobase.h:529:31, inlined from '_OI std::copy(_II, _II, _OI) [with _II = const char*; _OI = char*]' at /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/bits/stl_algobase.h:620:7, inlined from 'static _ForwardIterator std::__uninitialized_copy::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = const char*; _ForwardIterator = char*]' at /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/bits/stl_uninitialized.h:110:27, inlined from '_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = const char*; _ForwardIterator = char*]' at /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/bits/stl_uninitialized.h:151:15, inlined from '_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator,
[Bug c++/100516] New: Unexpected -Wstringop-overread in deque initialization from empty initializer_list
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100516 Bug ID: 100516 Summary: Unexpected -Wstringop-overread in deque initialization from empty initializer_list Product: gcc Version: 11.1.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vopl at bk dot ru CC: msebor at gcc dot gnu.org Target Milestone: ---
[Bug c++/93320] internal compiler error: in is_base_type, at dwarf2out.c:12987
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 EOFF template struct Generic { template using Api = decltype([](){}); }; template struct Def { using Api = Generic::template Api<>; }; Def d; EOFF $ 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': 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
[Bug c++/100396] [11.1 regression] The template function overload is not selected correctly
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100396 --- Comment #4 from vopl at bk dot ru --- I understand what you're saying. But, apparently, there is still corruption in the calculus of the substituted Args, please look at this code (thanks to johny5): /0/1/2/3/4/5/6/7 template struct Checker { using Some = decltype(F{}(Args{}...)); }; template concept valid = requires { typename Checker::Some; }; /0/1/2/3/4/5/6/7 template auto ovr(F f, Args... args) requires valid { return ovr(int{}, f, args...); } template auto ovr(int, F f, Args... args) { return f(args...); } /0/1/2/3/4/5/6/7 void use() { ovr([](double){}, 2.); } --- : In instantiation of 'struct Checker, double, double>': :8:25: required by substitution of 'template auto ovr(F, Args ...) requires valid [with F = use()::; Args = {double, double}]' :14:27: required from 'auto ovr(F, Args ...) requires valid [with F = use()::; Args = {double}]' :25:8: required from here :4:30: error: no match for call to '(use()::) (double, double)' 4 | using Some = decltype(F{}(Args{}...)); | ~~~^~~ :4:30: note: candidate: 'void (*)(double)' (conversion) :4:30: note: candidate expects 2 arguments, 3 provided :25:9: note: candidate: 'use()::' 25 | ovr([](double){}, 2.); | ^ :25:9: note: candidate expects 1 argument, 2 provided Take attention at 'Args' - it was {double} initially, but becomes {double, double} for second ovr call
[Bug c++/100396] [11.1 regression] The template function overload is not selected correctly
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100396 --- Comment #2 from vopl at bk dot ru --- Please, try this, also failed /0/1/2/3/4/5/6/7 template struct Checker { using Some = decltype(F{}(Args{}...)); }; template concept valid = requires { typename Checker::Some; }; /0/1/2/3/4/5/6/7 template auto ovr(F f, Args... args) requires valid { return ovr(int{}, f, args...); // a second ovr is expected to be called, but the compiler tries to call this ovr again. Collision between 'int' and 'F' is ignored, extra Args provided to call } template auto ovr(int, F f, Args... args) { return f(args...); } /0/1/2/3/4/5/6/7 void use() { ovr([]{}); } $ g++-11.1.0 -std=c++20 -c src.cpp src.cpp: In instantiation of 'struct Checker, use():: >': src.cpp:8:25: required by substitution of 'template auto ovr(F, Args ...) requires valid [with F = use()::; Args = {use()::}]' src.cpp:14:27: required from 'auto ovr(F, Args ...) requires valid [with F = use()::; Args = {}]' src.cpp:25:8: required from here src.cpp:4:30: error: no match for call to '(use()::) (use()::)' 4 | using Some = decltype(F{}(Args{}...)); | ~~~^~~ src.cpp:4:30: note: candidate: 'void (*)()' (conversion) src.cpp:4:30: note: candidate expects 1 argument, 2 provided src.cpp:25:9: note: candidate: 'use()::' 25 | ovr([]{}); | ^ src.cpp:25:9: note: candidate expects 0 arguments, 1 provided -- IMHO, the problem is not caused by concepts, but caused by corrupted overloading selection mechanic. Please, take a look at the collision between argument 'int{}' and first template parameter specified as 'F'. Next, no SFINAE expected in this case due to correct overloading, but overloading failed and SFINAE happens. Thanks.
[Bug c++/100396] New: [11.1 regression] The template function overload is not selected correctly
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100396 Bug ID: 100396 Summary: [11.1 regression] The template function overload is not selected correctly Product: gcc Version: 11.1.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vopl at bk dot ru Target Milestone: --- Regression in 11.1.0 $ cat src.cpp && echo EOFFF /0/1/2/3/4/5/6/7 template constexpr bool valid = (0 < sizeof(F{}(Args{}...))); /0/1/2/3/4/5/6/7 template void ovr(F f, Args... args) requires valid // external checker - fail, wrong Args formed //requires (0 < sizeof(F{}(Args{}...))) // inline checker - ok (are wrong Args compensated by SFINAE?) { return ovr(int{}, f, args...); // a second ovr is expected to be called, but the compiler tries to call this ovr again. Collision between 'int' and 'F' is ignored, extra Args appended from 'f' } template void ovr(int, F, Args...){} /0/1/2/3/4/5/6/7 void use() { ovr([]{return 'c';}); } EOFFF $ g++-11.1.0 -std=c++20 -c src.cpp src.cpp: In instantiation of 'constexpr const bool valid, use():: >': src.cpp:8:10: required by substitution of 'template void ovr(F, Args ...) requires valid [with F = use()::; Args = {use()::}]' src.cpp:11:27: required from 'void ovr(F, Args ...) requires valid [with F = use()::; Args = {}]' src.cpp:19:8: required from here src.cpp:3:39: error: no match for call to '(use()::) (use()::)' 3 | constexpr bool valid = (0 < sizeof(F{}(Args{}...))); | ^~~~ src.cpp:3:39: note: candidate: 'char (*)()' (conversion) src.cpp:3:39: note: candidate expects 1 argument, 2 provided src.cpp:19:9: note: candidate: 'use()::' 19 | ovr([]{return 'c';}); | ^ src.cpp:19:9: note: candidate expects 0 arguments, 1 provided $ g++-11.1.0 -v Using built-in specs. COLLECT_GCC=g++-11.1.0 COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/11.1.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-11.1.0/work/gcc-11.1.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/11.1.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/11.1.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/11.1.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/11.1.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/11.1.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 11.1.0 p1' --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 --disable-valgrind-annotations --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 11.1.0 (Gentoo 11.1.0 p1)
[Bug c++/99119] New: Class Types in Non-Type Template Parameters - ICE with templates nested
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99119 Bug ID: 99119 Summary: Class Types in Non-Type Template Parameters - ICE with templates nested Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vopl at bk dot ru Target Milestone: --- g++ 9, 10 $ cat test.cpp && echo EOFFF //Class Types in Non-Type Template Parameters - ICE with templates nested template struct Name {}; template constexpr Name<5> tname5 {}; template struct Use{}; // // now try to use tname5 Use> use0;//ok template Use> use1;//ICE //template Use> use2;//ICE //template Use> use3;//ICE template struct Tmpl { //Use> use0;// ICE //Use> use1;// ICE }; template struct Tmpl2 { //Use> use0;// ICE //Use> use1;// ICE }; template void f() { //Use> use0;// ICE }; EOFFF $ g++ -std=gnu++2a test.cpp test.cpp:13:32: internal compiler error: Segmentation fault 13 | template Use> use1;//ICE |^~ 0xa86b6d crash_signal /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/toplev.c:328 0x7fdedac189ef ??? /usr/src/debug/sys-libs/glibc-2.32-r6/glibc-2.32/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0 0xfa498e resolve_args(vec*, int) /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/call.c:4457 0x84a43d do_class_deduction /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/pt.c:28842 0x84a43d do_auto_deduction(tree_node*, tree_node*, tree_node*, int, auto_deduction_context, tree_node*, int) /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/pt.c:28975 0x73e0ab convert_template_argument /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/pt.c:8404 0x105ae43 coerce_template_parms /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/pt.c:8908 0x1058aed lookup_template_class_1 /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/pt.c:9746 0x10580d6 lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*, int, int) /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/pt.c:10118 0x10580d6 finish_template_type(tree_node*, tree_node*, int) /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/semantics.c:3408 0xec6792 cp_parser_template_id /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/parser.c:16739 0xed5dfa cp_parser_class_name /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/parser.c:23713 0xec40a5 cp_parser_qualifying_entity /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/parser.c:6776 0xec40a5 cp_parser_nested_name_specifier_opt /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/parser.c:6458 0x94a8ec cp_parser_template_introduction /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/parser.c:29203 0x6c5791 cp_parser_template_declaration_after_export /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/parser.c:29373 0x6c5791 cp_parser_template_declaration_after_parameters /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/parser.c:29068 0x6c18fe cp_parser_explicit_template_declaration /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/parser.c:29350 0xeae6ee cp_parser_template_declaration_after_export /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/parser.c:29369 0xeae6ee cp_parser_template_declaration /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/parser.c:15866
[Bug c++/86883] Unexpected error: expansion pattern '' contains no argument packs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86883 --- Comment #4 from vopl at bk dot ru --- One more: template struct Outer { template struct Inner; template Inner method();//error: expansion pattern 'V0' contains no parameter packs };
[Bug c++/86883] Unexpected error: expansion pattern '' contains no argument packs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86883 vopl at bk dot ru changed: What|Removed |Added CC||vopl at bk dot ru --- Comment #3 from vopl at bk dot ru --- Probably caused by the same $ cat test.cpp template struct Outer { template struct Inner { static bool Member; }; }; template template bool Outer::Inner::Member; $ g++-10.2.0 test.cpp test.cpp:12:34: error: expansion pattern ‘Values0’ contains no parameter packs 12 | bool Outer::Inner::Member; | ^ test.cpp:12:6: error: too many template-parameter-lists 12 | bool Outer::Inner::Member; | ^~~