view gcc/testsuite/g++.dg/torture/pr82154.C @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 84e7813d76e9
children
line wrap: on
line source

// { dg-do compile }
// { dg-additional-options "-Wno-deprecated" }

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;
}