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/] [init/] [new24.C] - Rev 338

Compare with Previous | Blame | View Log

// PR c++/33025
// { dg-do compile }
// { dg-options "-O2" }

typedef __SIZE_TYPE__ size_t;
inline void *operator new (size_t, void *p) throw () { return p; }
extern "C" void abort ();

int
main()
{
  const unsigned num = 10;
  unsigned *data = new unsigned[num];
  unsigned *ptr = new (data) unsigned (num);
  static unsigned data2[10];
  unsigned *ptr2 = new (&data2[0]) unsigned (10);
  return 0;
}

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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