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 }
|
//Check whether namespace-scoped template instantiations
|
//Check whether namespace-scoped template instantiations
|
//are mangled differently.
|
//are mangled differently.
|
|
|
namespace X{
|
namespace X{
|
template
|
template
|
struct Y{
|
struct Y{
|
int f(T){
|
int f(T){
|
return 1;
|
return 1;
|
}
|
}
|
templatevoid g(){}
|
templatevoid g(){}
|
};
|
};
|
}
|
}
|
|
|
template
|
template
|
struct Y{
|
struct Y{
|
int f(T){
|
int f(T){
|
return 2;
|
return 2;
|
}
|
}
|
};
|
};
|
|
|
int main()
|
int main()
|
{
|
{
|
X::Y z;
|
X::Y z;
|
if (z.f(4) != 1)
|
if (z.f(4) != 1)
|
return 1;
|
return 1;
|
z.g();
|
z.g();
|
|
|
Y z1;
|
Y z1;
|
if (z1.f(5) != 2)
|
if (z1.f(5) != 2)
|
return 1;
|
return 1;
|
return 0;
|
return 0;
|
}
|
}
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.