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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do run  }
2
int count;
3
 
4
struct base {
5
  base () { ++count; }
6
  ~base () { --count; }
7
  base(const base&o) { ++count; }
8
};
9
 
10
base base_returning_function ();
11
 
12
const base& base_ref = base_returning_function ();
13
 
14
int main () {
15
  if (count != 1)
16
    return 1;
17
}
18
 
19
base base_returning_function () {
20
  base local_base_object;
21
  return local_base_object;
22
}

powered by: WebSVN 2.1.0

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