view gcc/testsuite/g++.dg/torture/pr52582.C @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
line wrap: on
line source

// PR c++/52582

inline void *operator new (__SIZE_TYPE__, void *p) throw ()
{
  return p;
}
struct B
{
  virtual ~B ();
  B ();
};
struct A : B
{
  A () : B () {}
  virtual void bar ();
};
void
foo ()
{
  char a[64];
  B *b = new (&a) A ();
  b->~B ();
}