URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 301 |
Rev 384 |
/* PR c++/34059 */
|
/* PR c++/34059 */
|
/* { dg-do "compile" } */
|
/* { dg-do "compile" } */
|
|
|
struct A
|
struct A
|
{
|
{
|
template void foo();
|
template void foo();
|
};
|
};
|
struct B : A {};
|
struct B : A {};
|
struct C : A {};
|
struct C : A {};
|
|
|
class AA
|
class AA
|
{
|
{
|
template void foo(); /* { dg-error "is private" } */
|
template void foo(); /* { dg-error "is private" } */
|
};
|
};
|
struct BB : AA {};
|
struct BB : AA {};
|
|
|
class AAA {
|
class AAA {
|
int get() const {}
|
int get() const {}
|
};
|
};
|
struct BBB {
|
struct BBB {
|
static BBB *foo();
|
static BBB *foo();
|
private:
|
private:
|
int get() const {} /* { dg-error "is private" } */
|
int get() const {} /* { dg-error "is private" } */
|
};
|
};
|
template struct S {
|
template struct S {
|
S(unsigned int = BBB::foo()->AAA::get()); /* { dg-error "is not a base of" } */
|
S(unsigned int = BBB::foo()->AAA::get()); /* { dg-error "is not a base of" } */
|
};
|
};
|
template struct SS {
|
template struct SS {
|
SS(unsigned int = BBB::foo()->get());
|
SS(unsigned int = BBB::foo()->get());
|
};
|
};
|
|
|
void bar()
|
void bar()
|
{
|
{
|
B().C::foo<0>(); /* { dg-error "is not a member of" } */
|
B().C::foo<0>(); /* { dg-error "is not a member of" } */
|
BB().AA::foo<0>(); /* { dg-error "within this context" } */
|
BB().AA::foo<0>(); /* { dg-error "within this context" } */
|
|
|
int i;
|
int i;
|
i.C::foo<0>(); /* { dg-error "which is of non-class type" } */
|
i.C::foo<0>(); /* { dg-error "which is of non-class type" } */
|
|
|
S s; /* { dg-error "default argument" } */
|
S s; /* { dg-error "default argument" } */
|
SS ss; /* { dg-error "within this context" } */
|
SS ss; /* { dg-error "within this context" } */
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.