re PR c++/17232 ([DR 1640] classes and class template specializations treated differe...
[gcc.git] / gcc / cp / typeck2.c
index 24b559385276d19dd775e9527900c53cebf7fc02..3bac67cf1192f567fb1b3988b9984973553c7e29 100644 (file)
@@ -265,6 +265,10 @@ abstract_virtuals_error_sfinae (tree decl, tree type, abstract_class_use use,
     return 0;
   type = TYPE_MAIN_VARIANT (type);
 
+  /* In SFINAE context, force instantiation.  */
+  if (!(complain & tf_error))
+    complete_type (type);
+
   /* If the type is incomplete, we register it within a hash table,
      so that we can check again once it is completed. This makes sense
      only for objects for which we have a declaration or at least a