https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124732
Nathaniel Shead <nshead at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2026-04-03
CC| |nshead at gcc dot gnu.org
Status|UNCONFIRMED |ASSIGNED
Ever confirmed|0 |1
Assignee|unassigned at gcc dot gnu.org |nshead at gcc dot
gnu.org
Target Milestone|--- |16.0
Keywords| |needs-reduction
--- Comment #5 from Nathaniel Shead <nshead at gcc dot gnu.org> ---
Confirmed. Failure is on a checking-only assertion added for PR120013; in that
PR we register a streamed partial TEMPLATE_DECL and then got confused streaming
the DECL_TEMPLATE_RESULT of said decl. This case seems to be the other way
around; we've registered a streamed TYPE_DECL and break when we get around to
streaming the TEMPLATE_DECL for it separately.
The following is a minimal fix that I think should be safe, but I'd like to
reduce a testcase for this before submitting:
diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc
index 6958388e454..c47d8e7c093 100644
--- a/gcc/cp/module.cc
+++ b/gcc/cp/module.cc
@@ -8295,7 +8295,7 @@ trees_in::install_entity (tree decl)
if (!slot)
{
tree type = TREE_TYPE (decl);
- gcc_checking_assert (TREE_CODE (decl) == TYPE_DECL
+ gcc_checking_assert (TREE_CODE (not_tmpl) == TYPE_DECL
&& CLASS_TYPE_P (type)
&& CLASSTYPE_TEMPLATE_SPECIALIZATION (type));
slot = entity_map->get (DECL_UID (CLASSTYPE_TI_TEMPLATE (type)));