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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/26714
2
// { dg-do run }
3
 
4
extern "C" void abort();
5
 
6
bool ok = false;
7
struct A
8
{
9
  A() { }
10
  ~A() { if (!ok) abort(); }
11
};
12
 
13
struct B
14
{
15
  const A &a1;
16
  const A &a2;
17
  B() : a1(A()),a2(A()) { ok = true; }
18
};
19
 
20
int main()
21
{
22
  B b;
23
}

powered by: WebSVN 2.1.0

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