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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [tc1/] [dr213.C] - Blame information for rev 825

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// { dg-do compile }
2
// Origin: Giovanni Bajo 
3
// DR213: Lookup in dependent base classes
4
 
5
// We should emit an error at *instantiation* time because g(t) can't be
6
//  resolved to any function.
7
 
8
template  struct A : T {
9
  void h(T t) {
10
    f(t);
11
    g(t);     // { dg-error "" "" { xfail *-*-* } }
12
  }
13
};
14
 
15
struct B {
16
  void f(B);
17
  void g(B) {};
18
};
19
 
20
void f(B) {}
21
 
22
int main()
23
{
24
  A ab;   // { dg-error "" "" { xfail *-*-* } }
25
  B b;
26
  ab.h(b);
27
}

powered by: WebSVN 2.1.0

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