diff options
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r-- | gcc/cp/decl2.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index eec0c92..c122017 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -4531,6 +4531,10 @@ no_linkage_error (tree decl) /* In C++11 it's ok if the decl is defined. */ return; + if (DECL_LANG_SPECIFIC (decl) && DECL_MODULE_IMPORT_P (decl)) + /* An imported decl is ok. */ + return; + tree t = no_linkage_check (TREE_TYPE (decl), /*relaxed_p=*/false); if (t == NULL_TREE) /* The type that got us on no_linkage_decls must have gotten a name for @@ -5226,6 +5230,8 @@ c_parse_final_cleanups (void) if (priority_info_map) splay_tree_delete (priority_info_map); + fini_modules (); + /* Generate any missing aliases. */ maybe_apply_pending_pragma_weaks (); |