diff options
Diffstat (limited to 'gcc/cp/module.cc')
| -rw-r--r-- | gcc/cp/module.cc | 41 |
1 files changed, 28 insertions, 13 deletions
diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc index 81357a8..e9cacf1 100644 --- a/gcc/cp/module.cc +++ b/gcc/cp/module.cc @@ -6733,6 +6733,7 @@ trees_out::core_vals (tree t) WT (((lang_tree_node *)t)->baselink.binfo); WT (((lang_tree_node *)t)->baselink.functions); WT (((lang_tree_node *)t)->baselink.access_binfo); + WT (((lang_tree_node *)t)->baselink.common.chain); break; case CONSTRAINT_INFO: @@ -7302,6 +7303,7 @@ trees_in::core_vals (tree t) RT (((lang_tree_node *)t)->baselink.binfo); RTU (((lang_tree_node *)t)->baselink.functions); RT (((lang_tree_node *)t)->baselink.access_binfo); + RT (((lang_tree_node *)t)->baselink.common.chain); break; case CONSTRAINT_INFO: @@ -8994,11 +8996,14 @@ trees_in::decl_value () dump (dumper::TREE) && dump ("CDTOR %N is %scloned", decl, cloned_p ? "" : "not "); if (cloned_p) - build_cdtor_clones (decl, flags & 2, flags & 4, - /* Update the member vec, if there is - one (we're in a different cluster - to the class defn). */ - CLASSTYPE_MEMBER_VEC (DECL_CONTEXT (decl))); + { + /* Update the member vec, if there is one (we're in a different + cluster to the class defn) and this isn't a primary template + specialization (as in tsubst_function_decl). */ + bool up = (CLASSTYPE_MEMBER_VEC (DECL_CONTEXT (decl)) + && !primary_template_specialization_p (decl)); + build_cdtor_clones (decl, flags & 2, flags & 4, up); + } } } @@ -13046,12 +13051,11 @@ trees_in::read_var_def (tree decl, tree maybe_template) if (DECL_EXPLICIT_INSTANTIATION (decl) && !DECL_EXTERNAL (decl)) setup_explicit_instantiation_definition_linkage (decl); - if (DECL_IMPLICIT_INSTANTIATION (decl) - || (DECL_EXPLICIT_INSTANTIATION (decl) - && !DECL_EXTERNAL (decl)) - || (DECL_CLASS_SCOPE_P (decl) - && !DECL_VTABLE_OR_VTT_P (decl) - && !DECL_TEMPLATE_INFO (decl))) + /* Class static data members are handled in read_class_def. */ + if (!DECL_CLASS_SCOPE_P (decl) + && (DECL_IMPLICIT_INSTANTIATION (decl) + || (DECL_EXPLICIT_INSTANTIATION (decl) + && !DECL_EXTERNAL (decl)))) note_vague_linkage_variable (decl); } if (!dyn_init) @@ -13465,6 +13469,10 @@ trees_in::read_class_def (tree defn, tree maybe_template) DECL_ACCESS (d) = tree_cons (type, access, list); } } + + if (TREE_CODE (decl) == VAR_DECL + && TREE_CODE (maybe_template) != TEMPLATE_DECL) + note_vague_linkage_variable (decl); } } @@ -17241,13 +17249,16 @@ module_state::write_namespaces (elf_out *to, vec<depset *> spaces, flags |= 4; if (DECL_MODULE_EXPORT_P (ns)) flags |= 8; + if (TREE_DEPRECATED (ns)) + flags |= 16; dump () && dump ("Writing namespace:%u %N%s%s%s%s", b->cluster, ns, flags & 1 ? ", public" : "", flags & 2 ? ", inline" : "", flags & 4 ? ", purview" : "", - flags & 8 ? ", export" : ""); + flags & 8 ? ", export" : "", + flags & 16 ? ", deprecated" : ""); sec.u (b->cluster); sec.u (to->name (DECL_NAME (ns))); write_namespace (sec, b->deps[0]); @@ -17323,7 +17334,8 @@ module_state::read_namespaces (unsigned num) flags & 1 ? ", public" : "", flags & 2 ? ", inline" : "", flags & 4 ? ", purview" : "", - flags & 8 ? ", export" : ""); + flags & 8 ? ", export" : "", + flags & 16 ? ", deprecated" : ""); bool visible_p = ((flags & 8) || ((flags & 1) && (flags & 4) @@ -17344,6 +17356,9 @@ module_state::read_namespaces (unsigned num) DECL_MODULE_EXPORT_P (inner) = true; } + if (flags & 16) + TREE_DEPRECATED (inner) = true; + if (tags) DECL_ATTRIBUTES (inner) = tree_cons (get_identifier ("abi_tag"), tags, DECL_ATTRIBUTES (inner)); |
