preprocessor: Create the parser before handling command-line includes [PR115312]
[official-gcc.git] / gcc / testsuite / g++.dg / inherit / virtual15.C
blobebd8e3ad29bff29c0cb1694f120ca2be532dd8b7
1 // PR c++/100797
2 // { dg-do run }
4 bool ok = false;
5 struct S1 { virtual ~S1() {} };
6 struct S2 { virtual void f1() = 0; };
7 struct S3: S1, S2 {
8     void f1() { f2(); }
9     virtual void f2() = 0;
11 struct S4: S3 {
12   void f2() { ok = true; }
13   using S2::f1;
15 int main() {
16   S4().f1();
17   if (!ok) __builtin_abort ();