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/] [eh45.C] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// { dg-do run  }
2
int i;
3
int fail;
4
 
5
class ca {
6
public:
7
  ca() {
8
    if (++i != 1)
9
      fail = 1;
10
  }
11
  virtual ~ca() {
12
    if (++i != 4)
13
      fail = 4;
14
  }
15
};
16
 
17
class cb {
18
public:
19
  cb(const ca &rca) {
20
    if (++i != 2)
21
      fail = 2;
22
  }
23
  virtual ~cb() {
24
    if (++i != 3)
25
      fail = 3;
26
  }
27
};
28
 
29
void foo(const cb &rcb) {
30
}
31
 
32
int main(int argc, char **argv) {
33
  foo(cb(ca()));
34
  return fail;
35
}

powered by: WebSVN 2.1.0

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