===================================================================
@@ -7627,7 +7627,7 @@ instantiate_type (tree lhstype, tree rhs, tsubst_f
dependent on overload resolution. */
gcc_assert (TREE_CODE (rhs) == ADDR_EXPR
|| TREE_CODE (rhs) == COMPONENT_REF
- || really_overloaded_fn (rhs)
+ || is_overloaded_fn (rhs)
|| (flag_ms_extensions && TREE_CODE (rhs) == FUNCTION_DECL));
/* This should really only be used when attempting to distinguish
===================================================================
@@ -0,0 +1,20 @@
+// PR c++/58457
+
+struct allocator
+{
+ void operator delete (void*);
+ void* operator new (__SIZE_TYPE__, void*);
+};
+
+struct type : public allocator
+{
+ type() {}
+ using allocator::operator new;
+ using allocator::operator delete;
+};
+
+int main()
+{
+ new (0) type;
+ return 0;
+}