OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.dg/] [abi/] [cookie2.C] - Diff between revs 301 and 338

Only display areas with differences | Details | Blame | View Log

Rev 301 Rev 338
// { dg-options "-fabi-version=1" }
// { dg-options "-fabi-version=1" }
void *operator new[](__SIZE_TYPE__, void *);
void *operator new[](__SIZE_TYPE__, void *);
struct A {
struct A {
    ~A(){}
    ~A(){}
};
};
int main()
int main()
{
{
  A * a = (A*) new char[20];
  A * a = (A*) new char[20];
  A  * b = new(a) A[3];
  A  * b = new(a) A[3];
  // In the 3.2 ABI, a cookie was allocated in this case.
  // In the 3.2 ABI, a cookie was allocated in this case.
  if (a == b)
  if (a == b)
    return 1;
    return 1;
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.