(root)/
gcc-13.2.0/
gcc/
testsuite/
g++.dg/
template/
cast6.C
// PR c++/95728

template<typename T>
  void
  construct(T* p)
  { ::new(static_cast<void*>(p)) T; } // { dg-error "invalid .static_cast." }

template<typename T>
void
f(const T* t)
{
  construct(t);
}

int main()
{
  int i[1];
  f(i);
}