URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 305 |
Rev 338 |
// { dg-do run }
|
// { dg-do run }
|
// { dg-options "-Wall" }
|
// { dg-options "-Wall" }
|
// PRMS Id: 5135
|
// PRMS Id: 5135
|
// Bug: g++ complains that the result of the new expression is not used.
|
// Bug: g++ complains that the result of the new expression is not used.
|
|
|
extern "C" int printf (const char *, ...);
|
extern "C" int printf (const char *, ...);
|
inline void * operator new (__SIZE_TYPE__, void *p) { return p; }
|
inline void * operator new (__SIZE_TYPE__, void *p) { return p; }
|
|
|
class foo {
|
class foo {
|
public:
|
public:
|
foo() : a(42) {};
|
foo() : a(42) {};
|
int a;
|
int a;
|
};
|
};
|
|
|
int
|
int
|
main()
|
main()
|
{
|
{
|
char buffer[1024];
|
char buffer[1024];
|
|
|
new (buffer) foo;
|
new (buffer) foo;
|
|
|
foo* pY = (foo *)buffer;
|
foo* pY = (foo *)buffer;
|
|
|
return pY->a != 42;
|
return pY->a != 42;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.