2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / torture / pr68184.C
blobd0c7c84910ce502230f0ab69d9f94e4c94369e64
1 // { dg-do run }
2 namespace {
3 struct IFoo { virtual void foo() = 0; };
4 struct IBar { virtual void bar() = 0; };
6 struct FooBar : private IBar, private IFoo
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()  {}
20 void test()
22     FooBar foobar;
23     foobar.call_foo();
26 int main()
28     test();
29     return 0;