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 338 |
// { dg-do run }
|
// { dg-do run }
|
// GROUPS passed operators
|
// GROUPS passed operators
|
// copy file
|
// copy file
|
// From: gfm@mencon.mencon.oz.au (Graham Menhennitt)
|
// From: gfm@mencon.mencon.oz.au (Graham Menhennitt)
|
// Date: Thu, 29 Apr 93 20:53:07 EST
|
// Date: Thu, 29 Apr 93 20:53:07 EST
|
// Subject: 4 bugs in g++ 2.3.3
|
// Subject: 4 bugs in g++ 2.3.3
|
// Message-ID: <9304291053.AA00090@mencon>
|
// Message-ID: <9304291053.AA00090@mencon>
|
|
|
#include
|
#include
|
|
|
int pass = 0;
|
int pass = 0;
|
struct A {
|
struct A {
|
A(void) {}
|
A(void) {}
|
A(const A& a) { ; }
|
A(const A& a) { ; }
|
A& operator = (const A& a) { pass = 1; return *this; }
|
A& operator = (const A& a) { pass = 1; return *this; }
|
};
|
};
|
|
|
struct B {
|
struct B {
|
B(const A& aa) { B::a = aa; }
|
B(const A& aa) { B::a = aa; }
|
A a;
|
A a;
|
};
|
};
|
|
|
int main(void)
|
int main(void)
|
{
|
{
|
B b = A();
|
B b = A();
|
if (pass)
|
if (pass)
|
printf ("PASS\n");
|
printf ("PASS\n");
|
else
|
else
|
{ printf ("FAIL\n"); return 1; }
|
{ printf ("FAIL\n"); return 1; }
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.