(root)/
gcc-13.2.0/
gcc/
testsuite/
g++.dg/
torture/
pr82154.C
// { dg-do compile }
// { dg-additional-options "-std=c++14 -Wno-deprecated" }
// C++17 does not allow dynamic exception specification.

namespace a {
int b;
class c
{
};
}
class g
{
public:
  g ();
};
using a::b;
class d
{
public:
  d ();
  void e ();
};
class f
{
  d
  i ()
  {
    static d j;
    return d();
  }
  int *k () throw (a::c);
};


int *f::k () throw (a::c)
{
  static g h;
  i ();
  int l = 2;
  while (l)
    {
      --l;
      try
	{
	  operator new (b);
	}
      catch (a::c)
	{
	}
    }
  i ().e ();
  return 0;
}