+2019-06-21 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/90909
+ Revert:
+ 2019-05-21 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/67184
+ PR c++/69445
+ * call.c (build_over_call): Devirtualize when the final overrider
+ comes from the base.
+
2019-06-21 Marek Polacek <polacek@redhat.com>
PR c++/61490 - qualified-id in friend function definition.
/* See if the function member or the whole class type is declared
final and the call can be devirtualized. */
if (DECL_FINAL_P (fn)
- || CLASSTYPE_FINAL (TREE_TYPE (argtype)))
+ || CLASSTYPE_FINAL (TYPE_METHOD_BASETYPE (TREE_TYPE (fn))))
flags |= LOOKUP_NONVIRTUAL;
/* [class.mfct.nonstatic]: If a nonstatic member function of a class
+2019-06-21 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/90909
+ Revert:
+ 2019-05-21 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/67184
+ PR c++/69445
+ * g++.dg/other/final3.C: New.
+ * g++.dg/other/final4.C: Likewise.
+ * g++.dg/other/final5.C: Likewise.
+
+ * g++.dg/other/final6.C: New.
+
2019-06-21 Marek Polacek <polacek@redhat.com>
PR c++/61490 - qualified-id in friend function definition.
--- /dev/null
+// PR c++/90909
+// { dg-do link { target c++11 } }
+
+struct S1 { virtual void f() = 0; };
+struct S2: S1 { virtual void f() {} };
+struct S3: S2 { using S1::f; };
+struct S4 final: S3 { void g(); };
+void S4::g() { f(); }
+int main() { S4().g(); }