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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [init/] [lifetime1.C] - Blame information for rev 774

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

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/48370
2
// { dg-do run }
3
 
4
extern "C" void abort();
5
 
6
int last = 4;
7
 
8
struct A {
9
  int i;
10
  A(int i): i(i) { }
11
  ~A() { if (i > last) abort(); last = i; }
12
};
13
 
14
struct D { int i; };
15
 
16
struct B: D, A { B(int i): A(i) { } };
17
struct E: D, virtual A { E(int i): A(i) { } };
18
 
19
struct C
20
{
21
  const A& ar1;
22
  const A& ar2;
23
  const A& ar3;
24
};
25
 
26
int main()
27
{
28
  C c = { 1, B(2), E(3) };
29
}

powered by: WebSVN 2.1.0

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