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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/35548
2
// { dg-do run }
3
 
4
int c;
5
struct A
6
{
7
  A() { ++c; }
8
  A(const A&) { ++c; }
9
  ~A() { --c; }
10
};
11
 
12
A f()
13
{
14
  return A();
15
}
16
 
17
int i;
18
const A* ap;
19
int main()
20
{
21
  const A& ar = i ? *ap : f();
22
  return (c == 0);
23
}

powered by: WebSVN 2.1.0

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