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/] [overload8.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
class a {
3
public:
4
  int f()        { return 0; }
5
  int f() const  { return 1; }
6
};
7
 
8
class b : public a {
9
};
10
 
11
int main()
12
{
13
  int (b::* ptr1)()       = &b::f;
14
  int (b::* ptr2)() const = &b::f;
15
 
16
  b ao;
17
 
18
  if ((ao.*ptr1)() != 0)
19
    return 1;
20
  if ((ao.*ptr2)() != 1)
21
    return 1;
22
}
23
 

powered by: WebSVN 2.1.0

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