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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [template/] [koenig9.C] - Blame information for rev 801

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

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/29131
2
// int has no associated namespaces, so arg-dep lookup doesn't find g(int).
3
 
4
template  int f() { return g(T()); } // { dg-error "argument-dependent" }
5
int g(int);                                   // { dg-message "declared here" }
6
int i = f();
7
 
8
// PR c++/24163
9
// Unqualified lookup doesn't find names from dependent bases.
10
 
11
template 
12
struct A
13
{
14
  static void h(T);
15
};
16
 
17
template  struct B: A
18
{
19
  void f() { h(T()); }          // { dg-error "argument-dependent" }
20
  static void g() { h(T()); }   // { dg-error "argument-dependent" }
21
};
22
 
23
int main()
24
{
25
  B b;
26
  b.f();
27
  b.g();
28
}
29
 
30
// { dg-message "dependent base .A.int" "" { target *-*-* } 19 }
31
// { dg-message "this->h" "" { target *-*-* } 19 }
32
// { dg-message "dependent base .A.int" "" { target *-*-* } 20 }
33
// { dg-message "B::h" "" { target *-*-* } 20 }

powered by: WebSVN 2.1.0

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