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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.brendan/] [new3.C] - Diff between revs 149 and 154

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

Rev 149 Rev 154
// { dg-do run { xfail powerpc-ibm-aix* } }
// { dg-do run { xfail powerpc-ibm-aix* } }
// { dg-options "-flat_namespace" { target *-*-darwin[67]* } }
// { dg-options "-flat_namespace" { target *-*-darwin[67]* } }
// GROUPS passed operator-new
// GROUPS passed operator-new
#include 
#include 
#include 
#include 
#include 
#include 
int pass = 0;
int pass = 0;
void *operator new(size_t sz) throw (std::bad_alloc) {
void *operator new(size_t sz) throw (std::bad_alloc) {
  void *p;
  void *p;
  pass = 1;
  pass = 1;
  p = malloc(sz);
  p = malloc(sz);
  return p;
  return p;
}
}
class A {
class A {
public:
public:
  A() {}
  A() {}
  ~A() {}
  ~A() {}
  int a;
  int a;
  int b;
  int b;
};
};
int main()
int main()
{
{
  A *bb = new A[10];
  A *bb = new A[10];
  delete [] bb;
  delete [] bb;
  if (pass)
  if (pass)
    printf ("PASS\n");
    printf ("PASS\n");
  else
  else
    { printf ("FAIL\n"); return 1; }
    { printf ("FAIL\n"); return 1; }
}
}
 
 

powered by: WebSVN 2.1.0

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