OSDN Git Service

PR c++/34913
[pf3gnuchains/gcc-fork.git] / gcc / cp / repo.c
index 227c1ea..1fe96a2 100644 (file)
@@ -304,16 +304,19 @@ repo_emit_p (tree decl)
          && (!TYPE_LANG_SPECIFIC (type)
              || !CLASSTYPE_TEMPLATE_INSTANTIATION (type)))
        return 2;
-      /* Static data members initialized by constant expressions must
+      /* Const static data members initialized by constant expressions must
         be processed where needed so that their definitions are
         available.  */
-      if (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (decl)
+      if (DECL_INTEGRAL_CONSTANT_VAR_P (decl)
          && DECL_CLASS_SCOPE_P (decl))
        return 2;
     }
   else if (!DECL_TEMPLATE_INSTANTIATION (decl))
     return 2;
 
+  if (DECL_EXPLICIT_INSTANTIATION (decl))
+    return 2;
+
   /* For constructors and destructors, the repository contains
      information about the clones -- not the original function --
      because only the clones are emitted in the object file.  */
@@ -347,7 +350,7 @@ repo_emit_p (tree decl)
    export from this translation unit.  */
 
 bool
-repo_export_class_p (tree class_type)
+repo_export_class_p (const_tree class_type)
 {
   if (!flag_use_repository)
     return false;