URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.law/] [bad-error6.C] - Rev 154
Compare with Previous | Blame | View Log
// { dg-do assemble }
// GROUPS passed bad-errors
typedef __SIZE_TYPE__ size_t;
class tt {
public:
tt(int);
private:
void *operator new(size_t a); // Forbid object creation in heap memory.
};
void st(const tt&, int);
void ff(int i, int j)
{
if( i > 0 ) {
// This work ok.
tt a_tt(i);
st(a_tt, j);
}
else {
// This triggers an error because of private operator new ????.
st(tt(-i), j);
}
}