URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
// { dg-do assemble }
|
// { dg-do assemble }
|
|
|
// Here we declare ::S
|
// Here we declare ::S
|
typedef struct s1 *S;
|
typedef struct s1 *S;
|
|
|
struct s1
|
struct s1
|
{
|
{
|
int s;
|
int s;
|
};
|
};
|
|
|
struct A
|
struct A
|
{
|
{
|
// Here we declare A::S
|
// Here we declare A::S
|
typedef struct s1 *S;
|
typedef struct s1 *S;
|
};
|
};
|
|
|
template class XX;
|
template class XX;
|
|
|
template
|
template
|
class X
|
class X
|
{
|
{
|
public:
|
public:
|
static T *do_something ();
|
static T *do_something ();
|
friend class T; // { dg-error "" } `T' is a template parameter
|
friend class T; // { dg-error "" } `T' is a template parameter
|
friend class XX;
|
friend class XX;
|
};
|
};
|
|
|
struct N
|
struct N
|
{
|
{
|
// Here we declare N::S
|
// Here we declare N::S
|
class S
|
class S
|
{
|
{
|
};
|
};
|
|
|
// Should use N::S and A::S.
|
// Should use N::S and A::S.
|
typedef X X_S;
|
typedef X X_S;
|
|
|
void bug ();
|
void bug ();
|
};
|
};
|
|
|
void
|
void
|
N::bug ()
|
N::bug ()
|
{
|
{
|
// X_S is template class X
|
// X_S is template class X
|
// `s' is N::S.
|
// `s' is N::S.
|
S *s = X_S::do_something ();
|
S *s = X_S::do_something ();
|
}
|
}
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.