URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
// { dg-do run }
|
// { dg-do run }
|
// Origin: Volker Reichelt
|
// Origin: Volker Reichelt
|
|
|
// PR c++/12370
|
// PR c++/12370
|
// Wrong code because of the friend declaration
|
// Wrong code because of the friend declaration
|
|
|
template struct A
|
template struct A
|
{
|
{
|
T x;
|
T x;
|
A(T t) : x(t) {}
|
A(T t) : x(t) {}
|
friend A foo (const A&);
|
friend A foo (const A&);
|
};
|
};
|
|
|
A foo (const A& a)
|
A foo (const A& a)
|
{
|
{
|
A res(a.x);
|
A res(a.x);
|
return res;
|
return res;
|
}
|
}
|
|
|
int main()
|
int main()
|
{
|
{
|
return foo(A(0)).x;
|
return foo(A(0)).x;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.