aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.old-deja/g++.robertl/eb50.C
blob: 8d2c4033f73bd36846faf5953817e33a16c9d5c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// { dg-do run  }
struct foo { };
int f(int a, int b)
{
        if (b == 0)
                throw foo();
        return a / b;
}
int main()
{
        try {
                f(0, 0);
                return 1;
        } catch (foo x) {
                return 0;
        }
}