gcc/tests/Regression/bz1965951-Wrong-code-regression-starting-with-gcc-8-5/reproducer.cc
2021-07-09 15:36:20 +02:00

13 lines
278 B
C++

#include <iostream>
struct S1 { virtual ~S1() = default; };
struct S2 { virtual void f1() = 0; };
struct S3: S1, S2 {
void f1() { f2(); }
virtual void f2() = 0;
};
struct S4: S3 {
void f2() { std::cout << "called\n"; }
using S2::f1;
};
int main() { S4().f1(); }