2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / torture / pr82154.C
blobe229c3e640ee982e7b33fba6b1b4171c7083ec97
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     return d();
29   }
30   int *k () throw (a::c);
34 int *f::k () throw (a::c)
36   static g h;
37   i ();
38   int l = 2;
39   while (l)
40     {
41       --l;
42       try
43         {
44           operator new (b);
45         }
46       catch (a::c)
47         {
48         }
49     }
50   i ().e ();
51   return 0;