URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 305 |
Rev 384 |
// { dg-do run }
|
// { dg-do run }
|
// Origin: Mark Mitchell
|
// Origin: Mark Mitchell
|
|
|
extern "C" void abort ();
|
extern "C" void abort ();
|
|
|
int j;
|
int j;
|
|
|
struct S {
|
struct S {
|
static S* s[5];
|
static S* s[5];
|
|
|
S () { s[j++] = this; }
|
S () { s[j++] = this; }
|
S (const S&) { s[j++] = this; }
|
S (const S&) { s[j++] = this; }
|
~S () {
|
~S () {
|
for (int k = 0; k < j; ++k)
|
for (int k = 0; k < j; ++k)
|
if (s[k] == this)
|
if (s[k] == this)
|
return;
|
return;
|
abort ();
|
abort ();
|
}
|
}
|
};
|
};
|
|
|
S* S::s[5];
|
S* S::s[5];
|
|
|
struct T {
|
struct T {
|
int i;
|
int i;
|
S s;
|
S s;
|
};
|
};
|
|
|
T t;
|
T t;
|
|
|
T f () {
|
T f () {
|
return t;
|
return t;
|
}
|
}
|
|
|
void g (S) {
|
void g (S) {
|
}
|
}
|
|
|
int main ()
|
int main ()
|
{
|
{
|
g (f ().s);
|
g (f ().s);
|
}
|
}
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.