aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/eh/spec3-static.C
blob: 15408effa74f4f4e2deb2f57896e35034408a964 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// PR c++/4381
// Test that exception-specs work properly for classes with virtual bases.

// { dg-do run }
// { dg-options "-static" }

class Base {};

struct A : virtual public Base
{
  A() {}
};

struct B {};

void func() throw (B,A)
{
  throw A();
}

int main(void)
{
  try {	func(); }
  catch (A& a) { }
}