(root)/
gcc-13.2.0/
gcc/
testsuite/
g++.dg/
warn/
pr98104.C
// PR c++/98104

#include <new>

struct B
{
  B ();
  int *a;
  char b;
};

struct D : public B {};
void bar (B *);

void
foo ()
{
  D d;
  bar (::new (static_cast<B*>(&d)) B);	// { dg-bogus "placement new constructing an object of type 'B' and size '\[0-9]*' in a region of type 'B' and size '\[0-9]*'" }
}