blob: 6ca617befe2ae854d1e224e7334b201ad9244e33 [file] [log] [blame]
// 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]*'" }
}