[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / g++.dg / eh / pr43365.C
blob32346d5018cc84135eb0671ea51b89c019922c3b
1 extern "C" void abort();
3 class Counter
5 public:
6   static int count;
7   ~Counter() { count += 1; }
8 };
10 int Counter::count = 0;
12 void func()
14   Counter c;
16   try {
17     throw 1;
18   }
19   catch (const int&) {
20     return;
21   }
24 int main()
26   func();
27   if (Counter::count != 1)
28     abort();
29   return 0;