https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114685
Jason Merrill <jason at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |jason at gcc dot gnu.org Status|NEW |RESOLVED --- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> --- (In reply to Nathaniel Shead from comment #2) > This fails on > > if (data->hash->add_namespace_entities (decl, data->partitions)) > { > /* It contains an exported thing, so it is exported. */ > gcc_checking_assert (DECL_MODULE_PURVIEW_P (decl)); > DECL_MODULE_EXPORT_P (decl) = true; > } > > ultimately for a very similar reason to PR114683: non-functions brought in > by using-decls currently just bind the value directly which means that > there's nothing to indicate that they should be exported from this scope > (and not their original one). I just hacked around this in r15-1223 by changing the assert to setting DECL_MODULE_PURVIEW_P. I take your point that this shouldn't be happening; the exported decl is the using-decl, not the original one, so add_namespace_entities shouldn't return true for __gnu_cxx. But since it does, I think my change is a reasonable workaround. I'll adjust the comment.