Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.other/eh5.C

raw
1 // { dg-do assemble }
2 // { dg-options "-O2" }
3
4 struct X {};
5
6 struct Y
7 {
8 Y();
9 virtual ~Y();
10 };
11
12 struct Z
13 {
14 int f (const int *x);
15 int g;
16 };
17
18 inline int
19 operator<< (Z &os, int x)
20 {
21 os.f (&x);
22 return os.g;
23 }
24
25 void foo (Z &a, X *b, X &c)
26 {
27 X *d = b;
28 int e = 0;
29 Z &f = a;
30 if (!(f << e))
31 do { do { } while (&c == 0); throw Y(); } while (0);
32 do { } while (&d == 0);
33 do { } while (&c == 0);
34 }