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/] [p783a.C] - Diff between revs 305 and 338

Only display areas with differences | Details | Blame | View Log

Rev 305 Rev 338
// { dg-do run  }
// { dg-do run  }
// Copying into an object directly is a lose according to tiemann.
// Copying into an object directly is a lose according to tiemann.
// Deleting an object many times is a lose.
// Deleting an object many times is a lose.
// prms-id: 783
// prms-id: 783
extern "C" int printf (const char *, ...);
extern "C" int printf (const char *, ...);
extern "C" void exit (int);
extern "C" void exit (int);
class C {
class C {
  int i;
  int i;
public:
public:
  C() {
  C() {
    i = 1;
    i = 1;
  }
  }
  ~C() {
  ~C() {
    if (i != 1) {
    if (i != 1) {
      exit(1);
      exit(1);
    }
    }
    i = 0;
    i = 0;
  }
  }
};
};
int main(int argc, char**argv) {
int main(int argc, char**argv) {
  C c;
  C c;
  c = C();
  c = C();
  return 0;
  return 0;
}
}
 
 

powered by: WebSVN 2.1.0

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