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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [p783a.C] - Rev 149

Go to most recent revision | Compare with Previous | Blame | View Log

// { dg-do run  }
// Copying into an object directly is a lose according to tiemann.
// Deleting an object many times is a lose.
// prms-id: 783

extern "C" int printf (const char *, ...);
extern "C" void exit (int);

class C {
  int i;
public:
  C() {
    i = 1;
  }
  ~C() {
    if (i != 1) {
      exit(1);
    }
    i = 0;
  }
};

int main(int argc, char**argv) {
  C c;
  c = C();
  return 0;
}

Go to most recent revision | 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.