1// PR ipa/60315
2// { dg-do compile }
3// { dg-options "-std=c++11" }
4
5struct Base {
6    virtual int f() = 0;
7};
8
9struct Derived : public Base {
10    virtual int f() final override {
11        return 42;
12    }
13};
14
15extern Base* b;
16
17int main() {
18    return (static_cast<Derived*>(b)->*(&Derived::f))();
19}
20