URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 154 |
Rev 816 |
// { dg-do assemble }
|
// { dg-do assemble }
|
|
|
template
|
template
|
struct Foo { };
|
struct Foo { };
|
|
|
template
|
template
|
struct BT { };
|
struct BT { };
|
|
|
template
|
template
|
struct BT< Foo, Foo > { static const int i = 1; };
|
struct BT< Foo, Foo > { static const int i = 1; };
|
|
|
template
|
template
|
struct BT< T1, Foo > { static const int i = 2; };
|
struct BT< T1, Foo > { static const int i = 2; };
|
|
|
template
|
template
|
struct BT< Foo, T2 > { static const int i = 3; };
|
struct BT< Foo, T2 > { static const int i = 3; };
|
|
|
template
|
template
|
int foo(Foo, Foo)
|
int foo(Foo, Foo)
|
{
|
{
|
return 1;
|
return 1;
|
}
|
}
|
|
|
template
|
template
|
int foo(T1, Foo)
|
int foo(T1, Foo)
|
{
|
{
|
return 2;
|
return 2;
|
}
|
}
|
|
|
template
|
template
|
int foo(Foo, T2)
|
int foo(Foo, T2)
|
{
|
{
|
return 3;
|
return 3;
|
}
|
}
|
|
|
void f()
|
void f()
|
{
|
{
|
BT< double, Foo >::i;
|
BT< double, Foo >::i;
|
BT< Foo, Foo >::i;
|
BT< Foo, Foo >::i;
|
BT< Foo, float >::i;
|
BT< Foo, float >::i;
|
foo(1.0, Foo());
|
foo(1.0, Foo());
|
foo(Foo(), Foo());
|
foo(Foo(), Foo());
|
foo(Foo(), 1.0);
|
foo(Foo(), 1.0);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.