Merge from mainline (165734:167278).
[official-gcc/graphite-test-results.git] / gcc / testsuite / g++.dg / abi / cookie2.C
blobdc180453b706a766d9c3170c9ce800a05d95cd1b
1 // { dg-options "-fabi-version=1" }
3 void *operator new[](__SIZE_TYPE__, void *);
5 struct A {
6     ~A(){}
7 };
9 int main()
11   A * a = (A*) new char[20];
12   A  * b = new(a) A[3];
13   // In the 3.2 ABI, a cookie was allocated in this case.
14   if (a == b)
15     return 1;