repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR c++/28145
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
abi
/
cookie2.C
blob
dc180453b706a766d9c3170c9ce800a05d95cd1b
1
// { dg-options "-fabi-version=1" }
2
3
void *operator new[](__SIZE_TYPE__, void *);
4
5
struct A {
6
~A(){}
7
};
8
9
int main()
10
{
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;
16
}