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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [init/] [value10.C] - Rev 774

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

// PR c++/51331
// { dg-do run }

struct A {
  A(): x(10) {}
  virtual ~A() {}

  int x;
};

struct B: public virtual A {
};

struct C: public virtual A {
};

struct D: public B, virtual public C {
  D(): B(), C() {}  // note an explicit call to C() which is auto-generated
};

int main() {
  D* d = new D();

  // Crashes here with the following message:
  // *** glibc detected *** ./test: free(): invalid next size (fast)
  delete d;
}

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.