URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 305 |
Rev 338 |
// { dg-do assemble }
|
// { dg-do assemble }
|
// GROUPS passed bad-errors
|
// GROUPS passed bad-errors
|
typedef __SIZE_TYPE__ size_t;
|
typedef __SIZE_TYPE__ size_t;
|
|
|
class tt {
|
class tt {
|
public:
|
public:
|
tt(int);
|
tt(int);
|
|
|
private:
|
private:
|
void *operator new(size_t a); // Forbid object creation in heap memory.
|
void *operator new(size_t a); // Forbid object creation in heap memory.
|
};
|
};
|
|
|
void st(const tt&, int);
|
void st(const tt&, int);
|
|
|
void ff(int i, int j)
|
void ff(int i, int j)
|
{
|
{
|
if( i > 0 ) {
|
if( i > 0 ) {
|
// This work ok.
|
// This work ok.
|
tt a_tt(i);
|
tt a_tt(i);
|
st(a_tt, j);
|
st(a_tt, j);
|
}
|
}
|
else {
|
else {
|
// This triggers an error because of private operator new ????.
|
// This triggers an error because of private operator new ????.
|
st(tt(-i), j);
|
st(tt(-i), j);
|
}
|
}
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.