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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [p12306a.C] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// { dg-do run  }
2
// prms-id: 12306
3
// a net report of the same problem as 12306
4
 
5
class a {
6
public:
7
    int i;
8
};
9
 
10
class g : virtual public a {
11
};
12
 
13
class b : virtual public a {
14
    int j;
15
};
16
 
17
class c : public g, public b {
18
};
19
 
20
class d {
21
public:
22
    virtual class b* get() {return 0;}
23
};
24
 
25
class f : public d {
26
public:
27
    virtual class b* get() {return &_c;}
28
    c _c;
29
};
30
 
31
int main(void) {
32
    f D;
33
    b* bp=D.get();
34
    D._c.i = 42;
35
    return &D._c.i != &bp->i;
36
}

powered by: WebSVN 2.1.0

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