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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [conversion/] [ptrmem7.C] - Blame information for rev 316

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

Line No. Rev Author Line
1 301 jeremybenn
// Copyright (C) 2007 Free Software Foundation
2
// Contributed by Ollie Wild 
3
// { dg-do compile }
4
 
5
// Assorted pointer to member function implicit cast tests.
6
 
7
struct A { int f (); };
8
struct B : A { int f (); };
9
struct P : A { int f (); };
10
struct V { int f (); };
11
struct D : B, virtual V, private P { int f (); };
12
 
13
// Valid.
14
int (D::*p1)() = &B::f;
15
 
16
// Derived class.
17
int (B::*p2)() = &D::f; // { dg-error "" }
18
 
19
// Virtual base class.
20
int (D::*p3)() = &V::f; // { dg-error "" }
21
 
22
// Inaccessible base class.
23
int (D::*p4)() = &P::f; // { dg-error "" }
24
 
25
// Ambiguous base class.
26
int (D::*p5)() = &A::f;  // { dg-error "" }
27
 
28
// Different member type.
29
float (D::*p6)() = &B::f;  // { dg-error "" }

powered by: WebSVN 2.1.0

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