https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92447
Bug ID: 92447 Summary: [10 Regression] ICE in poplevel, at cp/decl.c:585 Product: gcc Version: 10.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com Target Milestone: --- g++-10.0.0-alpha20191110 snapshot (r278028) ICEs when compiling the following testcase reduced from test/clang-tidy/readability-deleted-default.cpp from the clang-tools-extra 9.0.0 testsuite: template <typename T> void TemplateFunctionWithInnerClass() { class InnerNotAssignable { public: InnerNotAssignable &operator=(InnerNotAssignable &&Other) = default; private: const T TVar{}; }; }; void Foo() { TemplateFunctionWithInnerClass<int>(); } % g++-10.0.0-alpha20191110 -c zg7svuec.cpp zg7svuec.cpp: In instantiation of 'void TemplateFunctionWithInnerClass() [with T = int]': zg7svuec.cpp:12:39: required from here zg7svuec.cpp:8:4: internal compiler error: in poplevel, at cp/decl.c:585 8 | }; | ^ 0x5fa0af poplevel(int, int, int) /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191110/work/gcc-10-20191110/gcc/cp/decl.c:585 0x974569 do_poplevel(tree_node*) /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191110/work/gcc-10-20191110/gcc/cp/semantics.c:452 0x9777d4 finish_compound_stmt(tree_node*) /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191110/work/gcc-10-20191110/gcc/cp/semantics.c:1534 0x93f13b tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191110/work/gcc-10-20191110/gcc/cp/pt.c:17819 0x939e0a tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191110/work/gcc-10-20191110/gcc/cp/pt.c:17497 0x939e0a instantiate_decl(tree_node*, bool, bool) /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191110/work/gcc-10-20191110/gcc/cp/pt.c:25299 0x96682c instantiate_pending_templates(int) /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191110/work/gcc-10-20191110/gcc/cp/pt.c:25415 0x88545e c_parse_final_cleanups() /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191110/work/gcc-10-20191110/gcc/cp/decl2.c:4852