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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [tc1/] [dr213.C] - Blame information for rev 709

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

Line No. Rev Author Line
1 693 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-message "" }
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;
25
  B b;
26
  ab.h(b);   // { dg-message "required" }
27
}

powered by: WebSVN 2.1.0

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