Debian Codegraph @

gcc/testsuite/g++.dg/torture/pr68184.C

raw
1 // { dg-do run }
2 namespace {
3 struct IFoo { virtual void foo() = 0; };
4 struct IBar { virtual void bar() = 0; };
5
6 struct FooBar : private IBar, private IFoo
7 {
8 void call_foo()
9 {
10 try
11 {
12 static_cast<IFoo*>(this)->foo();
13 }
14 catch( ... ) {}
15 }
16 void foo() { throw 1; }
17 void bar() {}
18 };
19
20 void test()
21 {
22 FooBar foobar;
23 foobar.call_foo();
24 }
25 }
26 int main()
27 {
28 test();
29 return 0;
30 }
31