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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [ref1.C] - Rev 699

Compare with Previous | Blame | View Log

// { dg-do run  }
int count;

struct base {
  base () { ++count; }
  ~base () { --count; }
  base(const base&o) { ++count; }
};

base base_returning_function ();

const base& base_ref = base_returning_function ();

int main () {
  if (count != 1)
    return 1;
}

base base_returning_function () {
  base local_base_object;
  return local_base_object;
}

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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