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] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/51331
2
// { dg-do run }
3
 
4
struct A {
5
  A(): x(10) {}
6
  virtual ~A() {}
7
 
8
  int x;
9
};
10
 
11
struct B: public virtual A {
12
};
13
 
14
struct C: public virtual A {
15
};
16
 
17
struct D: public B, virtual public C {
18
  D(): B(), C() {}  // note an explicit call to C() which is auto-generated
19
};
20
 
21
int main() {
22
  D* d = new D();
23
 
24
  // Crashes here with the following message:
25
  // *** glibc detected *** ./test: free(): invalid next size (fast)
26
  delete d;
27
}

powered by: WebSVN 2.1.0

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