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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.other/] [lookup4.C] - Blame information for rev 749

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

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do run  }
2
// Test for proper handling of references to overloaded member functions.
3
 
4
struct A {
5
  static void f (int) { }
6
  void f ();
7
};
8
 
9
void (*p)(int) = &A::f;
10
 
11
void A::f ()
12
{
13
  p = f;
14
}
15
 
16
int main()
17
{
18
  A a;
19
  p = &a.f;
20
  (a.f)();
21
  (a.f)(42);
22
}

powered by: WebSVN 2.1.0

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