OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [virt2.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do run  }
2
struct S0 {
3
  virtual int is_kind_of_S1 () const { return 0; }
4
  virtual void dummy () { }
5
};
6
 
7
struct S1 : virtual public S0 {
8
  virtual int is_kind_of_S1 () const { return 1; }
9
  virtual void dummy () { }
10
};
11
 
12
struct S2 : virtual public S0 {
13
  virtual void dummy () { }
14
};
15
 
16
struct S3 : public S2, public S1 {
17
  virtual void dummy () { }
18
};
19
 
20
static struct S0 *var = new S3 ();
21
 
22
int main () {
23
  if (var->is_kind_of_S1() != 1)
24
    return 1;
25
  return 0;
26
}

powered by: WebSVN 2.1.0

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