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 }
|
struct S
|
struct S
|
{
|
{
|
template
|
template
|
void f(T (&i)[7])
|
void f(T (&i)[7])
|
{}
|
{}
|
|
|
void g()
|
void g()
|
{
|
{
|
int i[] = {1, 2, 3, 4, 5, 6, 7};
|
int i[] = {1, 2, 3, 4, 5, 6, 7};
|
f(i);
|
f(i);
|
int j[7];
|
int j[7];
|
f(j);
|
f(j);
|
}
|
}
|
};
|
};
|
|
|
struct foo {
|
struct foo {
|
template
|
template
|
static T* array_end(T(&array)[N]) { return &array[N]; }
|
static T* array_end(T(&array)[N]) { return &array[N]; }
|
};
|
};
|
|
|
struct X
|
struct X
|
{
|
{
|
template
|
template
|
void f(const T1&) {}
|
void f(const T1&) {}
|
};
|
};
|
|
|
int main(int ac, char* av[]) {
|
int main(int ac, char* av[]) {
|
S s;
|
S s;
|
s.g();
|
s.g();
|
int i[] = {1,2,3,4,5};
|
int i[] = {1,2,3,4,5};
|
int* e = foo::array_end(i);
|
int* e = foo::array_end(i);
|
X x;
|
X x;
|
x.f("hello");
|
x.f("hello");
|
}
|
}
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.