URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
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; }
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.