OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.dg/] [tc1/] [dr213.C] - Diff between revs 301 and 338

Only display areas with differences | Details | Blame | View Log

Rev 301 Rev 338
// { dg-do compile }
// { dg-do compile }
// Origin: Giovanni Bajo 
// Origin: Giovanni Bajo 
// DR213: Lookup in dependent base classes
// DR213: Lookup in dependent base classes
// We should emit an error at *instantiation* time because g(t) can't be
// We should emit an error at *instantiation* time because g(t) can't be
//  resolved to any function.
//  resolved to any function.
template  struct A : T {
template  struct A : T {
  void h(T t) {
  void h(T t) {
    f(t);
    f(t);
    g(t);     // { dg-error "" "" { xfail *-*-* } }
    g(t);     // { dg-error "" "" { xfail *-*-* } }
  }
  }
};
};
struct B {
struct B {
  void f(B);
  void f(B);
  void g(B) {}
  void g(B) {}
};
};
void f(B) {}
void f(B) {}
int main()
int main()
{
{
  A ab;   // { dg-error "" "" { xfail *-*-* } }
  A ab;   // { dg-error "" "" { xfail *-*-* } }
  B b;
  B b;
  ab.h(b);
  ab.h(b);
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.