summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/warn/pr31246-2.C
blob: c9a4cae7e84b6812f12dadd65f71c8bcb50e3018 (plain)
1
2
3
4
5
6
7
8
9
// PR 31246
// { dg-do compile }
// { dg-options "-Wunreachable-code" }
#include <new>

int* get_ptr(void* ptr)
{
  return new(ptr) int();
}