https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108179
Bug ID: 108179 Summary: [11/12 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782 Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: s at stu dot scot Target Milestone: --- Created attachment 54126 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54126&action=edit Bug report from -freport-bug The following code produces an internal compiler error on all g++ 11 and 12 versions I tried. This is the most minimal example I could come up with. It compiles fine under g++ 10 and clang. ``` template <class T, T X, template <T> class F> struct Foo {}; template <class T0, class T1, T1 X, template <T1> class F> void f(Foo<T1, X, F>) {} ``` Works in: * g++-10 (Ubuntu 10.4.0-4ubuntu1~22.04) 10.4.0 Doesn't work in: * g++-11 (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0 * g++-12 (Ubuntu 12.1.0-2ubuntu1~22.04) 12.1.0 * x86-64 gcc 12.2 on compiler explorer: https://godbolt.org/z/EMncPKcea