Fix emission of exception dispatch (PR middle-end/82154).
[official-gcc.git] / gcc / testsuite / g++.dg / torture / pr82154.C
blobf4e1c3ea139ca74d7a61736da4b631986042f9de
1 // { dg-do compile }
2 // { dg-additional-options "-Wno-deprecated" }
4 namespace a {
5 int b;
6 class c
8 };
10 class g
12 public:
13   g ();
15 using a::b;
16 class d
18 public:
19   d ();
20   void e ();
22 class f
24   d
25   i ()
26   {
27     static d j;
28   }
29   int *k () throw (a::c);
33 int *f::k () throw (a::c)
35   static g h;
36   i ();
37   int l = 2;
38   while (l)
39     {
40       --l;
41       try
42         {
43           operator new (b);
44         }
45       catch (a::c)
46         {
47         }
48     }
49   i ().e ();