URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 154 |
Rev 816 |
// { dg-do run }
|
// { dg-do run }
|
// Origin: Giovanni Bajo
|
// Origin: Giovanni Bajo
|
// DR20: Some clarifications needed for 12.8 para 15
|
// DR20: Some clarifications needed for 12.8 para 15
|
|
|
extern "C" void printf(const char*, ...);
|
extern "C" void printf(const char*, ...);
|
extern "C" void abort(void);
|
extern "C" void abort(void);
|
|
|
int count = 0;
|
int count = 0;
|
|
|
class Thing {
|
class Thing {
|
public:
|
public:
|
Thing() {
|
Thing() {
|
}
|
}
|
~Thing() {
|
~Thing() {
|
}
|
}
|
Thing(const Thing&)
|
Thing(const Thing&)
|
{
|
{
|
count += 1;
|
count += 1;
|
}
|
}
|
};
|
};
|
|
|
Thing f() {
|
Thing f() {
|
Thing t;
|
Thing t;
|
return t;
|
return t;
|
}
|
}
|
|
|
int main(void)
|
int main(void)
|
{
|
{
|
Thing t2 = f();
|
Thing t2 = f();
|
printf("%d %x\n", count, &t2);
|
printf("%d %x\n", count, &t2);
|
if (count != 0)
|
if (count != 0)
|
abort();
|
abort();
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.