summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/torture/pr71405.C
blob: 52602437a081d4c1a3c8211d10c747fafec5c1eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// PR tree-optimization/71405
// { dg-do compile }

struct C
{
  C () {}
  int i;
};

void *
operator new (__SIZE_TYPE__ x, void *y)
{
  return y;
}

int
main ()
{
  int a;
  new (&a) C;
  return a; 
}