URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 301 |
Rev 338 |
// { dg-options "-O0" }
|
// { dg-options "-O0" }
|
// { dg-do compile }
|
// { dg-do compile }
|
// PR C++/34715
|
// PR C++/34715
|
|
|
|
|
namespace X
|
namespace X
|
{
|
{
|
template
|
template
|
const T& min(const T& a, const T& b);
|
const T& min(const T& a, const T& b);
|
|
|
template
|
template
|
inline __attribute__ ((always_inline)) const T& min(const T& a, const T& b)
|
inline __attribute__ ((always_inline)) const T& min(const T& a, const T& b)
|
{
|
{
|
return a < b ? a : b;
|
return a < b ? a : b;
|
}
|
}
|
}
|
}
|
template
|
template
|
inline __attribute__ ((always_inline)) T y(const T& a, const T& b)
|
inline __attribute__ ((always_inline)) T y(const T& a, const T& b)
|
{
|
{
|
return X::min(a, b);
|
return X::min(a, b);
|
}
|
}
|
int main()
|
int main()
|
{
|
{
|
int a = 0, b = 0;
|
int a = 0, b = 0;
|
return y(a, b);
|
return y(a, b);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.